standardise button styles

This commit is contained in:
gnattery
2013-03-21 00:37:46 +11:00
parent ee42ebbf1b
commit d26b3d42ed
29 changed files with 50 additions and 53 deletions

View File

@@ -12,7 +12,7 @@
.field
= f.text_area :body, :rows => 6, :class => 'input-block-level'
.actions
= f.submit 'Post comment', :class => 'btn'
= f.submit 'Post comment', :class => 'btn btn-primary'
- if defined?(@post)
.field
= f.hidden_field :post_id, :value => @post.id

View File

@@ -17,8 +17,8 @@
- if can? :edit, comment or can? :destroy, comment
.comment-actions
- if can? :edit, comment
= link_to 'Edit', edit_comment_path(comment), :class => 'btn'
= link_to 'Edit', edit_comment_path(comment), :class => 'btn btn-mini'
- if can? :destroy, comment
= link_to 'Delete', comment, method: :delete, |
data: { confirm: 'Are you sure?' }, :class => 'btn'
data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'

View File

@@ -16,4 +16,4 @@
- if can? :create, Crop
%div
= link_to 'New Crop', new_crop_path, {:class => 'btn'}
= link_to 'New Crop', new_crop_path, {:class => 'btn btn-primary'}

View File

@@ -19,9 +19,9 @@
- if can? :edit, @crop or can? :destroy, @crop
%p
- if can? :edit, @crop
= link_to 'Edit', edit_crop_path(@crop), { :class => 'btn' }
= link_to 'Edit', edit_crop_path(@crop), { :class => 'btn btn-mini' }
- if can? :destroy, @crop
= link_to 'Destroy', @crop, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn'
= link_to 'Destroy', @crop, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
%p
=link_to "Plant this", new_planting_path(:crop_id => @crop.id), :class => 'btn btn-large btn-primary'
=link_to "Plant this", new_planting_path(:crop_id => @crop.id), :class => 'btn btn-primary'

View File

@@ -43,6 +43,6 @@
.controls= f.password_field :password_confirmation
.form-actions
= f.submit "Update", :class => 'btn'
= f.submit "Update", :class => 'btn btn-primary'
=f.hidden_field(:tos_agreement, :value => true)

View File

@@ -26,6 +26,6 @@
= link_to('Terms of Service', url_for(:action => 'tos', :controller => '/policy'))
.form-actions
= f.submit "Sign up", :class => 'btn'
= f.submit "Sign up", :class => 'btn btn-primary'
= render "devise/shared/links"

View File

@@ -18,7 +18,7 @@
Remember me
.form-actions
= f.submit "Sign in", :class => 'btn'
= f.submit "Sign in", :class => 'btn btn-primary'
= render "devise/shared/links"

View File

@@ -16,4 +16,4 @@
= f.label :owner_id, :class => 'control-label'
.controls= collection_select(:forum, :owner_id, Member.all, :id, :login_name)
.form-actions
= f.submit 'Save', :class => 'btn'
= f.submit 'Save', :class => 'btn btn-primary'

View File

@@ -5,8 +5,8 @@
%p
= pluralize(forum.posts.count, "post")
|
=link_to "Post", new_post_path(:forum_id => forum.id)
|
=link_to "Visit forum", forum
|
=link_to "Post", new_post_path(:forum_id => forum.id), :class => 'btn btn-mini'
=render :partial => "posts/summary", :locals => { :posts => forum.posts, :howmany => 4 }

View File

@@ -10,11 +10,11 @@
= link_to @forum.owner, @forum.owner
- if can? :edit, @forum
=link_to "Edit", edit_forum_path(@forum), :class => 'btn'
=link_to "Edit", edit_forum_path(@forum), :class => 'btn btn-mini'
%h2
Posts
=link_to "Post something", new_post_path(:forum_id => @forum.id), :class => 'btn'
=link_to "Post something", new_post_path(:forum_id => @forum.id), :class => 'btn btn-primary'
- if @forum.posts.count > 0
=render :partial => "posts/summary", :locals => { :posts => @forum.posts }

View File

@@ -14,4 +14,4 @@
.controls= f.text_area :description, :rows => 6
.form-actions
= f.submit 'Save', :class => 'btn'
= f.submit 'Save Garden', :class => 'btn btn-primary'

View File

@@ -15,9 +15,9 @@
%td= garden.owner
%td= garden.slug
%td= link_to 'Show', garden
%td= link_to 'Edit', edit_garden_path(garden)
%td= link_to 'Destroy', garden, method: :delete, data: { confirm: 'Are you sure?' }
%td= link_to 'Edit', edit_garden_path(garden), :class => 'btn btn-mini'
%td= link_to 'Destroy', garden, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
%br
= link_to 'New Garden', new_garden_path
= link_to 'New Garden', new_garden_path, :class => 'btn btn-primary'

View File

@@ -14,16 +14,16 @@
= link_to "#{othergarden}", garden_path(othergarden)
- if can? :create, @garden
= link_to 'New Garden', new_garden_path, :class => 'btn btn-mini'
= link_to 'Add New Garden', new_garden_path, :class => 'btn btn-mini'
.span9
%div
:markdown
#{@garden.description}
- if can? :edit, @garden
= link_to 'Edit Garden', edit_garden_path(@garden), :class => 'btn btn-mini'
= link_to 'Edit garden', edit_garden_path(@garden), :class => 'btn btn-mini'
- if can? :destroy, @garden
= link_to 'Delete Garden', @garden, method: :delete, |
= link_to 'Delete garden', @garden, method: :delete, |
data: { confirm: 'All plantings associated with this garden will also be deleted. Are you sure?' }, :class => 'btn btn-mini'
%h3

View File

@@ -3,4 +3,4 @@
%p #{Growstuff::Application.config.site_name} is a community of food gardeners working together to build an open source platform to track, share, and discuss edible gardens and sustainable lifestyles. You can join us right now and be part of growing our website, from seed to harvest. We welcome you regardless of your experience, and invite you to be part of our development process.
%p= link_to 'Learn more', 'http://wiki.growstuff.org/', :class => 'btn btn-primary btn-large'
%p= link_to 'Learn more', 'http://wiki.growstuff.org/', :class => 'btn btn-primary'

View File

@@ -11,13 +11,13 @@
%b Your profile:
=link_to current_member, current_member
%small
= link_to "Edit", edit_registration_path(current_member)
= link_to "Edit", edit_registration_path(current_member), :class => 'btn btn-mini'
%p
%b Your location:
= current_member.location ? current_member.location : 'Not set'
%small
= link_to "Edit", edit_registration_path(current_member)
= link_to "Edit", edit_registration_path(current_member), :class => 'btn btn-mini'
%ul.inline
%li.first
@@ -26,7 +26,7 @@
%li= link_to g.name, g
- if can? :create, Garden
%li
%small= link_to 'Add a garden', new_garden_path
%small= link_to 'Add a garden', new_garden_path, :class => 'btn btn-mini'
.span4
- if current_member.has_role?(:admin)

View File

@@ -28,7 +28,7 @@
- first_garden = false
= link_to g.name, "#garden#{g.id}", 'data-toggle' => 'tab'
- if current_member == @member
%li= link_to 'New Garden', '#garden_new', 'data-toggle' => 'tab'
%li= link_to 'New Garden', '#garden_new', 'data-toggle' => 'tab', :class => 'btn btn-primary'
.tab-content
- first_garden = true
- @member.gardens.each do |g|

View File

@@ -27,9 +27,6 @@
- else
%strong= n.created_at.to_s(:date)
%td
- if n.read
= link_to 'Delete', n, method: :delete, data: { confirm: 'Are you sure?' }
- else
%strong= link_to 'Delete', n, method: :delete, data: { confirm: 'Are you sure?' }
= link_to 'Delete', n, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
- else
You have no messages.

View File

@@ -15,4 +15,4 @@
#{ strip_tags(@notification.body) }
%p
=link_to 'Delete', @notification, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn'
=link_to 'Delete notification', @notification, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'

View File

@@ -25,4 +25,4 @@
.controls= f.text_area :description, :rows => 6
.form-actions
= f.submit 'Save', :class => 'btn'
= f.submit 'Save planting', :class => 'btn btn-primary'

View File

@@ -27,6 +27,6 @@
- if can? :edit, planting or can? :destroy, planting
%p
- if can? :edit, planting
=link_to 'Edit', edit_planting_path(planting), :class => 'btn'
=link_to 'Edit planting', edit_planting_path(planting), :class => 'btn btn-mini'
- if can? :destroy, planting
=link_to 'Destroy', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn'
=link_to 'Destory planting', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'

View File

@@ -7,7 +7,7 @@
= @planting.planted_at ? @planting.planted_at.to_s(:date) : "not specified"
- if can? :edit, @planting
%small
= link_to 'Edit', edit_planting_path(@planting)
= link_to 'Edit', edit_planting_path(@planting), :class => 'btn btn-mini'
%p
%b Where:
=link_to "#{@planting.owner}'s", @planting.owner
@@ -19,13 +19,13 @@
= @planting.quantity != 0 ? @planting.quantity : "not specified"
- if can? :edit, @planting
%small
= link_to 'Edit', edit_planting_path(@planting)
= link_to 'Edit', edit_planting_path(@planting), :class => 'btn btn-mini'
.span6
.well
%h3
= link_to @planting.crop, @planting.crop
- if can? :create, Planting
= link_to 'Plant this', new_planting_path, :class => 'btn'
= link_to 'Plant another', new_planting_path, :class => 'btn btn-primary'
%p
%b Scientific name:
@@ -49,4 +49,4 @@
#{ @planting.description != "" ? @planting.description : "No description given." }
- if can? :edit, @planting
= link_to 'Edit', edit_planting_path(@planting)
= link_to 'Edit', edit_planting_path(@planting), :class => 'btn btn-mini'

View File

@@ -20,4 +20,4 @@
.field
= f.hidden_field :forum_id, :value => forum.id
= f.submit "Post", :class => 'btn'
= f.submit "Post", :class => 'btn btn-primary'

View File

@@ -30,6 +30,6 @@
%li= link_to "Reply", new_comment_path(:post_id => post.id)
%li= link_to "Permalink", post
-if can? :edit, post
%li= link_to "Edit", edit_post_path(post)
%li= link_to "Edit", edit_post_path(post), :class => 'btn btn-mini'

View File

@@ -5,10 +5,10 @@
- if can? :edit, @post or can? :destroy, @post
.post-actions
- if can? :edit, @post
= link_to 'Edit Post', edit_post_path(@post), :class => 'btn'
= link_to 'Edit Post', edit_post_path(@post), :class => 'btn btn-mini'
- if can? :destroy, @post
= link_to 'Delete Post', @post, method: :delete, |
data: { confirm: 'Are you sure?' }, :class => 'btn'
data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
%a{:name => "comments"}
@@ -23,4 +23,4 @@
- if can? :create, Comment
.post-actions
=link_to 'Comment', new_comment_path(:post_id => @post.id), :class => 'btn'
=link_to 'Comment', new_comment_path(:post_id => @post.id), :class => 'btn btn-primary'

View File

@@ -13,9 +13,9 @@
%td= role.name
%td= role.description
%td= link_to 'Show', role
%td= link_to 'Edit', edit_role_path(role)
%td= link_to 'Destroy', role, method: :delete, data: { confirm: 'Are you sure?' }
%td= link_to 'Edit', edit_role_path(role), :class => 'btn btn-mini'
%td= link_to 'Destroy', role, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
%br
= link_to 'New Role', new_role_path
= link_to 'New Role', new_role_path, :class => 'btn btn-primary'

View File

@@ -7,6 +7,6 @@
%b Description:
= @role.description
= link_to 'Edit', edit_role_path(@role)
= link_to 'Edit', edit_role_path(@role), :class => 'btn btn-mini'
\|
= link_to 'Back', roles_path

View File

@@ -15,12 +15,12 @@
%td= link_to 'Show', scientific_name
%td
- if can? :edit, scientific_name
= link_to 'Edit', edit_scientific_name_path(scientific_name)
= link_to 'Edit', edit_scientific_name_path(scientific_name), :class => 'btn btn-mini'
%td
- if can? :destroy, scientific_name
= link_to 'Destroy', scientific_name, method: :delete, data: { confirm: 'Are you sure?' }
= link_to 'Destroy', scientific_name, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
%br
- if can? :create, ScientificName
= link_to 'New Scientific name', new_scientific_name_path
= link_to 'New Scientific name', new_scientific_name_path, :class => 'btn btn-primary'

View File

@@ -7,6 +7,6 @@
%b Crop:
= @scientific_name.crop_id
= link_to 'Edit', edit_scientific_name_path(@scientific_name)
= link_to 'Edit', edit_scientific_name_path(@scientific_name), :class => 'btn btn-mini'
\|
= link_to 'Back', scientific_names_path

View File

@@ -15,7 +15,7 @@ describe "notifications/show" do
end
it "includes a delete button" do
assert_select "a", "Delete"
assert_select "a", "Delete notification"
end
end