0001-Move-styles-for-count-and-private-to-a-new-class-nam.patch

Marius BALTEANU, 2018-12-16 17:05

Download (6 KB)

View differences:

app/helpers/issues_helper.rb
82 82
    s << '<div>'
83 83
    subject = h(issue.subject)
84 84
    if issue.is_private?
85
      subject = subject + ' ' + content_tag('span', l(:field_is_private), :class => 'private')
85
      subject = subject + ' ' + content_tag('span', l(:field_is_private), :class => 'badge badge-private private')
86 86
    end
87 87
    s << content_tag('h3', subject)
88 88
    s << '</div>' * (ancestors.size + 1)
app/helpers/journals_helper.rb
49 49
        links << link_to(l(:button_delete),
50 50
                         journal_path(journal, :journal => {:notes => ""}),
51 51
                         :remote => true,
52
                         :method => 'put', :data => {:confirm => l(:text_are_you_sure)}, 
52
                         :method => 'put', :data => {:confirm => l(:text_are_you_sure)},
53 53
                         :title => l(:button_delete),
54 54
                         :class => 'icon-only icon-del'
55 55
                        )
......
64 64

  
65 65
  def render_private_notes_indicator(journal)
66 66
    content = journal.private_notes? ? l(:field_is_private) : ''
67
    css_classes = journal.private_notes? ? 'private' : ''
67
    css_classes = journal.private_notes? ? 'badge badge-private private' : ''
68 68
    content_tag('span', content.html_safe, :id => "journal-#{journal.id}-private_notes", :class => css_classes)
69 69
  end
70 70
end
app/views/issues/_list.html.erb
24 24
    <tr class="group open">
25 25
      <td colspan="<%= query.inline_columns.size + 2 %>">
26 26
        <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
27
        <span class="name"><%= group_name %></span> <span class="count"><%= group_count %></span> <span class="totals"><%= group_totals %></span>
27
        <span class="name"><%= group_name %></span> <span class="badge badge-count count"><%= group_count %></span> <span class="totals"><%= group_totals %></span>
28 28
        <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
29 29
                             "toggleAllRowGroups(this)", :class => 'toggle-all') %>
30 30
      </td>
app/views/timelog/_list.html.erb
23 23
        <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
24 24
        <span class="name"><%= group_name %></span>
25 25
        <% if group_count %>
26
        <span class="count"><%= group_count %></span>
26
        <span class="badge badge-count count"><%= group_count %></span>
27 27
        <% end %>
28 28
        <span class="totals"><%= group_totals %></span>
29 29
        <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
public/stylesheets/application.css
344 344
table.list.enumerations {table-layout: fixed; margin-bottom: 2em;}
345 345

  
346 346
tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; background-color: #fff;}
347
tr.group span.name {font-weight:bold;}
348
tr.group span.count {font-weight:bold; position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;}
347
tr.group span.count {top:-1px;}
348
tr.group span.name {font-weight:bold;}}
349 349
tr.group span.totals {color: #aaa; font-size: 80%;}
350 350
tr.group span.totals .value {font-weight:bold; color:#777;}
351 351
tr.group a.toggle-all { color: #aaa; font-size: 80%; display:none; float:right; margin-right:4px;}
......
469 469
div.issue div.subject>div>p { margin-top: 0.5em; }
470 470
div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;}
471 471
div.issue p.author {margin-top:0.5em;}
472
div.issue span.private, div.journal span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;}
472
div.issue span.private, div.journal span.private {font-size: 60%;}
473 473
div.issue .next-prev-links {color:#999;}
474 474
div.issue .attributes {margin-top: 2em;}
475 475
div.issue .attributes .attribute {padding-left:180px; clear:left; min-height: 1.8em;}
......
1244 1244
.version-behind-schedule a, .issue-behind-schedule a {color: #f66914;}
1245 1245
.version-overdue a, .issue-overdue a, .project-overdue a {color: #f00;}
1246 1246

  
1247
/***** Badges *****/
1248
.badge {
1249
  position:relative;
1250
  font-weight:bold;
1251
  font-size: 10px;
1252
  bottom: 2px;
1253
  padding: 0px 2px 0px 2px;
1254
  margin-right: 2px;
1255
  border-radius: 2px;
1256
  text-transform: uppercase;
1257
  text-decoration: none;
1258
}
1259
.badge-private {
1260
  background: #d22;
1261
  color: #fff;
1262
}
1263
.badge-count {
1264
  color: #fff;
1265
  background:#9DB9D5;
1266
}
1247 1267
/***** Icons *****/
1248 1268
.icon {
1249 1269
  background-position: 0% 50%;
1250
-