diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:07:50 +0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-08-11 02:25:15 +0400 |
commit | 775418918782d5284000ed0bfea364458c748567 (patch) | |
tree | c31e3633a3bcbed17b000f0165cf35edad41f7ca /app/views/wikis | |
parent | 1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff) |
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'app/views/wikis')
-rw-r--r-- | app/views/wikis/_form.html.haml | 8 | ||||
-rw-r--r-- | app/views/wikis/history.html.haml | 2 | ||||
-rw-r--r-- | app/views/wikis/pages.html.haml | 2 | ||||
-rw-r--r-- | app/views/wikis/show.html.haml | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/app/views/wikis/_form.html.haml b/app/views/wikis/_form.html.haml index 20b5b112819..6b6411be55b 100644 --- a/app/views/wikis/_form.html.haml +++ b/app/views/wikis/_form.html.haml @@ -9,7 +9,7 @@ .main_box .top_box_content = f.label :title - .input= f.text_field :title, :class => 'span8' + .input= f.text_field :title, class: 'span8' = f.hidden_field :slug .middle_box_content .input @@ -20,7 +20,7 @@ .bottom_box_content = f.label :content - .input= f.text_area :content, :class => 'span8' + .input= f.text_area :content, class: 'span8' .actions - = f.submit 'Save', :class => "primary btn" - = link_to "Cancel", project_wiki_path(@project, :index), :class => "btn" + = f.submit 'Save', class: "primary btn" + = link_to "Cancel", project_wiki_path(@project, :index), class: "btn" diff --git a/app/views/wikis/history.html.haml b/app/views/wikis/history.html.haml index f82c681fcde..e31c5dc2426 100644 --- a/app/views/wikis/history.html.haml +++ b/app/views/wikis/history.html.haml @@ -13,7 +13,7 @@ %tr %td= i + 1 %td - = link_to wiki_page.created_at.to_s(:short), project_wiki_path(@project, wiki_page, :old_page_id => wiki_page.id) + = link_to wiki_page.created_at.to_s(:short), project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id) (#{time_ago_in_words(wiki_page.created_at)} ago) %td= wiki_page.user.name diff --git a/app/views/wikis/pages.html.haml b/app/views/wikis/pages.html.haml index c84621193d5..2bfd0deb149 100644 --- a/app/views/wikis/pages.html.haml +++ b/app/views/wikis/pages.html.haml @@ -10,7 +10,7 @@ - @wikis.each_with_index do |wiki_page, i| %tr %td - = link_to wiki_page.title, project_wiki_path(@project, wiki_page, :old_page_id => wiki_page.id) + = link_to wiki_page.title, project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id) (#{time_ago_in_words(wiki_page.created_at)} ago) %td= wiki_page.slug diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml index 579aeb41796..fc2352271d5 100644 --- a/app/views/wikis/show.html.haml +++ b/app/views/wikis/show.html.haml @@ -1,12 +1,12 @@ %h3.page_title = @wiki.title %span.right - = link_to pages_project_wikis_path(@project), :class => "btn small grouped" do + = link_to pages_project_wikis_path(@project), class: "btn small grouped" do Pages - if can? current_user, :write_wiki, @project - = link_to history_project_wiki_path(@project, @wiki), :class => "btn small grouped" do + = link_to history_project_wiki_path(@project, @wiki), class: "btn small grouped" do History - = link_to edit_project_wiki_path(@project, @wiki), :class => "btn small grouped" do + = link_to edit_project_wiki_path(@project, @wiki), class: "btn small grouped" do %i.icon-edit Edit %br @@ -17,8 +17,8 @@ %p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago - if can? current_user, :admin_wiki, @project - = link_to project_wiki_path(@project, @wiki), :confirm => "Are you sure you want to delete this page?", :method => :delete do + = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete do Delete this page %hr -.wiki_notes#notes= render "notes/notes", :tid => @wiki.id, :tt => "wiki" +.wiki_notes#notes= render "notes/notes", tid: @wiki.id, tt: "wiki" |