diff options
-rw-r--r-- | app/helpers/issues_helper.rb | 3 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 3 | ||||
-rw-r--r-- | public/stylesheets/application.css | 1 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 8 |
4 files changed, 12 insertions, 3 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index a6515d283..b04ec5fb0 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -84,9 +84,6 @@ module IssuesHelper end s << '<div>' subject = h(issue.subject) - if issue.is_private? - subject = subject + ' ' + content_tag('span', l(:field_is_private), :class => 'badge badge-private private') - end s << content_tag('h3', subject) s << '</div>' * (ancestors.size + 1) s.html_safe diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index df54335a8..f40f206d7 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -2,6 +2,9 @@ <h2 class="inline-flex"><%= issue_heading(@issue) %></h2> <%= issue_status_type_badge(@issue.status) %> +<% if @issue.is_private? %> + <span class="badge badge-private private"><%= l(:field_is_private) %></span> +<% end %> <div class="<%= @issue.css_classes %> details"> <% if @prev_issue_id || @next_issue_id %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 78857fcc3..70911e4f6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1451,6 +1451,7 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { .badge-private { background: #d22; color: #fff; + border: 1px solid #d22; } .badge-count { color: #fff; diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e339ed3d4..07533a854 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -3020,6 +3020,14 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select 'span.badge.badge-status-closed', text: 'closed' end + def test_show_should_display_private_badge_for_private_issue + @request.session[:user_id] = 1 + get :show, params: {id: 14} + + assert_response :success + assert_select 'span.badge.badge-private', text: 'Private' + end + def test_get_new @request.session[:user_id] = 2 get( |