From d35fc7cbdc4b8c55f88f1a63bd51cbca5f77200d Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Fri, 8 May 2015 10:44:15 +0200 Subject: [PATCH 01/84] Remove invalid

tag wrapping breadcrumb This is invalid markup. Signed-off-by: Alex Coles --- app/assets/stylesheets/layout/_breadcrumb.sass | 7 +------ app/views/layouts/angular.html.erb | 6 ++---- app/views/layouts/base.html.erb | 6 ++---- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/layout/_breadcrumb.sass b/app/assets/stylesheets/layout/_breadcrumb.sass index 2877899034..cbf846b5ed 100644 --- a/app/assets/stylesheets/layout/_breadcrumb.sass +++ b/app/assets/stylesheets/layout/_breadcrumb.sass @@ -47,10 +47,6 @@ &.hidden-navigation margin-left: $main-menu-folded-width - h1 - margin-bottom: 0 - margin-left: 13px - a @extend %breadcrumb--default-font @@ -63,7 +59,7 @@ max-width: $breadcrumb-height ul.breadcrumb - margin: 0 + margin: 0 0 0 13px padding: 0 list-style: none list-style-position: outside @@ -86,4 +82,3 @@ ul.breadcrumb margin: 0 0 0 10px padding: 0 25px 0 0 background: image-url('breadcrumb-list.png') no-repeat right center - diff --git a/app/views/layouts/angular.html.erb b/app/views/layouts/angular.html.erb index 0c9c487288..8c065a3beb 100644 --- a/app/views/layouts/angular.html.erb +++ b/app/views/layouts/angular.html.erb @@ -113,10 +113,8 @@ See doc/COPYRIGHT.rdoc for more details. <% if show_decoration %> <% end %>
<%= (show_decoration) ? '' : 'nomenus' %>" id="content" diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index f1128ed9cf..ee944f7559 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -110,10 +110,8 @@ See doc/COPYRIGHT.rdoc for more details. <% if show_decoration %> <% end %>
<%= (show_decoration) ? '' : 'nomenus' %>" id="content" From f34a6788b418f1262e3f9f4bbff222abed072b3d Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 11:46:32 +0200 Subject: [PATCH 02/84] introduce a toolbar helper Signed-off-by: Florian Kraft --- app/helpers/toolbar_helper.rb | 26 ++++++++++++++++++++ app/views/layouts/_toolbar.html.erb | 38 ----------------------------- 2 files changed, 26 insertions(+), 38 deletions(-) create mode 100644 app/helpers/toolbar_helper.rb delete mode 100644 app/views/layouts/_toolbar.html.erb diff --git a/app/helpers/toolbar_helper.rb b/app/helpers/toolbar_helper.rb new file mode 100644 index 0000000000..30fc739298 --- /dev/null +++ b/app/helpers/toolbar_helper.rb @@ -0,0 +1,26 @@ +module ToolbarHelper + def toolbar(title:, &block) + content_tag :div, class: 'toolbar-container' do + content_tag :div, id: 'toolbar' do + dom_title(title) + dom_toolbar do + yield if block_given? + end + end + end + end + + protected + + def dom_title(title) + content_tag :div, class: 'title-container' do + content_tag :h2, title, title: title + end + end + + def dom_toolbar(&block) + return '' unless block_given? + content_tag :ul, class: 'toolbar-items' do + yield + end + end +end diff --git a/app/views/layouts/_toolbar.html.erb b/app/views/layouts/_toolbar.html.erb deleted file mode 100644 index 0a54352e68..0000000000 --- a/app/views/layouts/_toolbar.html.erb +++ /dev/null @@ -1,38 +0,0 @@ -<%#-- copyright -OpenProject is a project management system. -Copyright (C) 2012-2015 the OpenProject Foundation (OPF) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 3. - -OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -Copyright (C) 2006-2013 Jean-Philippe Lang -Copyright (C) 2010-2013 the ChiliProject Team - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -See doc/COPYRIGHT.rdoc for more details. - -++#%> - -<% if content_for?(:toolbar) %> -
-
-
    - <%= content_for :toolbar %> -
-
-
-<% end %> From 6c500a02c1d335ac3ab8df22c6519f11865a53ce Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 11:46:59 +0200 Subject: [PATCH 03/84] use new toolbar component in project overview Signed-off-by: Florian Kraft --- app/views/projects/show.html.erb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index d34c7f7bbd..29ec2b3ef1 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -27,14 +27,13 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> -<% content_for :action_menu_specific do %> +<%= toolbar title: l(:label_overview) do %> <% if User.current.allowed_to?(:add_subprojects, @project) %> - <%= link_to l(:label_subproject_new), {:controller => '/projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %> +
  • + <%= link_to l(:label_subproject_new), {:controller => '/projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add button' %> +
  • <% end %> <% end %> - -

    <%=l(:label_overview)%>

    -<%= render :partial => 'layouts/action_menu_specific' %> <% breadcrumb_paths(l(:label_overview)) %>
    From 4bbc70686f7621691070a1a26e232e455c69cdf2 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 13:14:11 +0200 Subject: [PATCH 04/84] add a possible subtitle to the toolbar Signed-off-by: Florian Kraft --- app/assets/stylesheets/layout/_toolbar.sass | 4 ++++ app/helpers/toolbar_helper.rb | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/layout/_toolbar.sass b/app/assets/stylesheets/layout/_toolbar.sass index 07deb15318..e8c278107c 100644 --- a/app/assets/stylesheets/layout/_toolbar.sass +++ b/app/assets/stylesheets/layout/_toolbar.sass @@ -78,6 +78,10 @@ border: 0 padding: 12px 0 0 0 + .subtitle + font-size: rem-calc(14px) + font-style: italic + span color: $content-link-color diff --git a/app/helpers/toolbar_helper.rb b/app/helpers/toolbar_helper.rb index 30fc739298..5cd285ab06 100644 --- a/app/helpers/toolbar_helper.rb +++ b/app/helpers/toolbar_helper.rb @@ -1,8 +1,8 @@ module ToolbarHelper - def toolbar(title:, &block) + def toolbar(title:, subtitle: '', &block) content_tag :div, class: 'toolbar-container' do content_tag :div, id: 'toolbar' do - dom_title(title) + dom_toolbar do + dom_title(title, subtitle) + dom_toolbar do yield if block_given? end end @@ -11,9 +11,10 @@ module ToolbarHelper protected - def dom_title(title) + def dom_title(title, subtitle) content_tag :div, class: 'title-container' do - content_tag :h2, title, title: title + content_tag(:h2, title, title: title) + + content_tag(:p, subtitle, class: 'subtitle') end end From 54602d2ab2de8ecdd3c6139c1f5aa8f9e75b1f50 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 13:14:21 +0200 Subject: [PATCH 05/84] use toolbar in activities index Signed-off-by: Florian Kraft --- app/views/activities/index.html.erb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index e21989501d..00758a836c 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -29,10 +29,9 @@ See doc/COPYRIGHT.rdoc for more details. <%= call_hook :activity_index_head %> -

    <%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %>

    -

    - <%= l(:label_date_from_to, start: format_date(@date_to - @days), end: format_date(@date_to-1)) %> -

    +<%= toolbar title: (@author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe), + subtitle: l(:label_date_from_to, start: format_date(@date_to - @days), end: format_date(@date_to-1)) +%>
    <% @events_by_day.keys.sort.reverse.each do |day| %> From 41548342a75feaa0936b49d28e3c1f0d4445a806 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 13:16:12 +0200 Subject: [PATCH 06/84] use toolbar in roadmap overview Signed-off-by: Florian Kraft --- app/views/versions/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index ab3422c3db..9f68860c2f 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=l(:label_roadmap)%>

    +<%= toolbar title: l(:label_roadmap) %> <% if @versions.empty? %>

    <%= l(:label_no_data) %>

    <% else %> From 4c14e283235fb7c9cef4f14f620016a6adf04946 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 13:19:26 +0200 Subject: [PATCH 07/84] use toolbar in work packages summary Signed-off-by: Florian Kraft --- app/views/work_packages/reports/report.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/work_packages/reports/report.html.erb b/app/views/work_packages/reports/report.html.erb index ce54c61682..0cca88dbf1 100644 --- a/app/views/work_packages/reports/report.html.erb +++ b/app/views/work_packages/reports/report.html.erb @@ -27,7 +27,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% html_title l(:label_summary) %> -

    <%=l(:label_summary)%>

    +<%= toolbar title: l(:label_summary) %>
    <% [@type_report, @priority_report, @assignee_report, @responsible_report, @author_report].each do |report| %> From 90a89a29ae17dd007dd2c828fc256f6abe0aa685 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 13:20:33 +0200 Subject: [PATCH 08/84] use toolbar in workpackages create form (legacy) Signed-off-by: Florian Kraft --- app/views/work_packages/new.html.erb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/work_packages/new.html.erb b/app/views/work_packages/new.html.erb index 881bef6874..cc65843770 100644 --- a/app/views/work_packages/new.html.erb +++ b/app/views/work_packages/new.html.erb @@ -28,9 +28,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% html_title l(:label_work_package_new) %> - -

    <%=l(:label_work_package_new)%>

    - +<%= toolbar title: l(:label_work_package_new) %> <%= labelled_tabular_form_for work_package, :url => project_work_packages_path(project), From 07d659bcc77c78ccde76ea3b2672d09ae236aa08 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 14:25:59 +0200 Subject: [PATCH 09/84] add support for subtitles Signed-off-by: Florian Kraft --- app/helpers/toolbar_helper.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/toolbar_helper.rb b/app/helpers/toolbar_helper.rb index 5cd285ab06..8f049fbaf1 100644 --- a/app/helpers/toolbar_helper.rb +++ b/app/helpers/toolbar_helper.rb @@ -13,14 +13,15 @@ module ToolbarHelper def dom_title(title, subtitle) content_tag :div, class: 'title-container' do - content_tag(:h2, title, title: title) + - content_tag(:p, subtitle, class: 'subtitle') + heading = content_tag(:h2, title, title: title) + next heading if subtitle.blank? + heading + content_tag(:p, subtitle, class: 'subtitle') end end def dom_toolbar(&block) return '' unless block_given? - content_tag :ul, class: 'toolbar-items' do + content_tag :ul, id: 'toolbar-items' do yield end end From 1a8838094f4b0aa0c22b595c250df6c819d6b105 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 14:26:35 +0200 Subject: [PATCH 10/84] cleanup timelines view and use new component Signed-off-by: Florian Kraft --- app/helpers/application_helper.rb | 4 +-- app/helpers/timelines_helper.rb | 33 +++++++++++++++++++++ app/views/timelines/edit.html.erb | 4 +-- app/views/timelines/show.html.erb | 48 ++++++++++++++----------------- 4 files changed, 58 insertions(+), 31 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 01f75f324b..68ece11064 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -70,8 +70,8 @@ module ApplicationHelper safe_join [name, ' ', content_tag('span', '*', class: 'required')] end - def li_unless_nil(link) - content_tag(:li, link) if link + def li_unless_nil(link, options = {}) + content_tag(:li, link, options) if link end # Show a sorted linkified (if active) comma-joined list of users diff --git a/app/helpers/timelines_helper.rb b/app/helpers/timelines_helper.rb index 5726a45ceb..5b54600f82 100644 --- a/app/helpers/timelines_helper.rb +++ b/app/helpers/timelines_helper.rb @@ -182,4 +182,37 @@ module TimelinesHelper def timeline_options OpenStruct.new @timeline.options end + + def new_timeline_link(project, &_block) + link_to({ controller: '/timelines', action: 'new', project_id: project }, + title: l('timelines.new_timeline'), + class: 'button -alt-highlight') do + yield if block_given? + end + end + + def edit_timeline_link(project, timeline, &_block) + link_to({ controller: '/timelines', + action: 'edit', + project_id: project, + id: timeline }, + class: 'button', + accesskey: accesskey(:edit)) do + yield if block_given? + end + end + + def destroy_timeline_link(project, timeline, &_block) + link_to({ controller: '/timelines', + action: 'confirm_destroy', + project_id: project, + id: timeline }, + class: 'button') do + yield if block_given? + end + end + + def timeline_action_authorized?(action) + authorize_for(:timelines, action) + end end diff --git a/app/views/timelines/edit.html.erb b/app/views/timelines/edit.html.erb index 187e027f10..de3d7057a3 100644 --- a/app/views/timelines/edit.html.erb +++ b/app/views/timelines/edit.html.erb @@ -27,9 +27,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% html_title I18n.t("timelines.edit_timeline", :timeline => @timeline.name) %> -

    - <%=I18n.t("timelines.edit_timeline", :timeline => @timeline.name)%> -

    +<%= toolbar title: I18n.t("timelines.edit_timeline", :timeline => @timeline.name) %> <%= labelled_tabular_form_for(@timeline, :url => project_timeline_path(@project, @timeline), diff --git a/app/views/timelines/show.html.erb b/app/views/timelines/show.html.erb index 40bc3be8e9..a0db206757 100644 --- a/app/views/timelines/show.html.erb +++ b/app/views/timelines/show.html.erb @@ -28,36 +28,32 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% html_title "#{l('timelines.project_menu.timelines')}: #{@timeline.name}" %> +<%= toolbar title: @timeline.name do %> + <% if timeline_action_authorized?(:new) %> +
  • + <%= new_timeline_link @project do %> + <%= l('timelines.new_timeline') %><%= h(@timeline.name) %> + <% end %> +
  • + <% end %> -<% content_for :action_menu_specific do %> - - <%= li_unless_nil(link_to_if_authorized(l('timelines.new_timeline'), - {:controller => '/timelines', :action => 'new', :project_id => @project}, - :title => l('timelines.new_timeline'), - :class => 'icon icon-add')) %> - - <%= li_unless_nil(link_to_if_authorized({:controller => '/timelines', - :action => 'edit', - :project_id => @project, - :id => @timeline}, - :class => 'icon icon-edit', - :accesskey => accesskey(:edit)) do %> - <%= l(:button_edit) %><%= h(@timeline.name) %> - <% end) %> + <% if timeline_action_authorized?(:edit) %> +
  • + <%= edit_timeline_link @project, @timeline do %> + <%= l(:button_edit) %><%= h(@timeline.name) %> + <% end %> +
  • + <% end %> - <%= li_unless_nil(link_to_if_authorized({:controller => '/timelines', - :action => 'confirm_destroy', - :project_id => @project, - :id => @timeline}, - :class => 'icon icon-delete') do %> - <%= l(:button_delete) %><%= h(@timeline.name) %> - <% end) %> + <% if timeline_action_authorized?(:destroy) %> +
  • + <%= destroy_timeline_link @project, @timeline do %> + <%= l(:button_delete) %><%= h(@timeline.name) %> + <% end %> +
  • + <% end %> <% end %> -

    <%= @timeline.name %>

    - -<%= render :partial => 'layouts/action_menu_specific' %> -
    <%= form_tag '', {:id => "specialForm", 'ng-controller' => 'TimelineSelectionController'} do %> From 06876f94a88b2bd2f1bef48b8dd7b87281f623b9 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 14:29:58 +0200 Subject: [PATCH 11/84] use toolbar in calendar view Signed-off-by: Florian Kraft --- app/views/work_packages/calendars/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/work_packages/calendars/index.html.erb b/app/views/work_packages/calendars/index.html.erb index 37d3369333..35937ff9a5 100644 --- a/app/views/work_packages/calendars/index.html.erb +++ b/app/views/work_packages/calendars/index.html.erb @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%= @query.new_record? ? l(:label_calendar) : h(@query.name) %>

    +<%= toolbar title: (@query.new_record? ? l(:label_calendar) : h(@query.name)) %> <%= form_tag(work_packages_calendar_index_path, :method => :get, :id => 'query_form') do %> <%= hidden_field_tag('project_id', @project.to_param) if @project%>
    "> From f78d1b6254a0a8567ac46d3441f2aded09686713 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 18 May 2015 14:39:28 +0200 Subject: [PATCH 12/84] use toolbar component in news sections Signed-off-by: Florian Kraft --- app/controllers/news_controller.rb | 2 -- app/views/news/edit.html.erb | 3 +-- app/views/news/index.html.erb | 15 +++++++++++-- app/views/news/show.html.erb | 34 +++++++++++++++++++++--------- config/initializers/menus.rb | 14 ++++++------ 5 files changed, 45 insertions(+), 23 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 65f7da949d..a542b4d319 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -41,8 +41,6 @@ class NewsController < ApplicationController before_filter :find_optional_project, only: [:index] accept_key_auth :index - menu_item :new_news, only: [:new, :create] - def index scope = @project ? @project.news.visible : News.visible diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb index b21d47b26b..4407612ef5 100644 --- a/app/views/news/edit.html.erb +++ b/app/views/news/edit.html.erb @@ -28,8 +28,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% html_title l(:label_news_edit) %> - -

    <%= News.model_name.human %>

    +<%= toolbar title: News.model_name.human %> <%= labelled_tabular_form_for @news, :html => { :id => 'news-form' } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index d399f0e28b..1b3fcfce71 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -26,7 +26,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=l(:label_news_plural)%>

    +<% html_title(l(:label_news_plural)) -%> +<%= toolbar title: l(:label_news_plural) do %> + <% if User.current.allowed_to?(:manage_news, @project) %> +
  • + <%= link_to new_project_news_path(@project), title: l(:label_news_new), id: 'new_news_link', class: 'button -alt-highlight' do %> + <%= l(:label_news_new) %> + <% end %> +
  • + <%= javascript_tag do %> + jQuery(function($) { $('#new_news_link').focus() }); + <% end %> + <% end %> +<% end %> <% if @newss.empty? %>

    <%= l(:label_no_data) %>

    <% else %> @@ -49,4 +61,3 @@ See doc/COPYRIGHT.rdoc for more details. <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> <% end %> -<% html_title(l(:label_news_plural)) -%> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index 3d9e2e5853..56606a4fb6 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -33,18 +33,32 @@ See doc/COPYRIGHT.rdoc for more details. :class => 'icon icon-edit', :accesskey => accesskey(:edit), :onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %> - <%= watcher_link(@news, User.current) %> - <%= link_to(l(:button_delete), - news_path(@news), - :confirm => l(:text_are_you_sure), - :method => :delete, - :class => 'icon icon-delete') if User.current.allowed_to?(:manage_news, @project) %> +<% end %> +<%= toolbar title: "#{avatar(@news.author)} #{@news.title}" do %> + <% if User.current.allowed_to?(:manage_news, @project) %> + <%= link_to(edit_news_path(@news), + :accesskey => accesskey(:edit), + class: 'button', + :onclick => 'Element.show("edit-news"); return false;') do %> + <%= l(:button_edit) %> + <% end %> + <% end %> +
  • + <%# hack around the old watchers_link implementation %> +
    + <%= watcher_link(@news, User.current) %> +
    +
  • + <% if User.current.allowed_to?(:manage_news, @project) %> + <%= link_to(news_path(@news), + :confirm => l(:text_are_you_sure), + :method => :delete, + :class => 'button') do %> + <%= l(:button_delete) %> + <% end %> + <% end %> <% end %> -
    - <%= render :partial => 'layouts/action_menu_specific' %> -

    <%= avatar(@news.author) %><%=h @news.title %>

    -
    <% if authorize_for('news', 'edit') %>