mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Move the "Private" badge next to the "Open/Closed" badge (#33832).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20334 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e703e3851f
commit
afed0f3748
@ -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
|
||||
|
||||
@ -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 %>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user