Collapsable-history.patch

Olivier Houdas, 2015-01-07 11:27

Download (3.35 KB)

View differences:

app/views/issues/_history.html.erb Wed Jan 07 11:26:01 2015 +0100
1 1
<% reply_links = authorize_for('issues', 'edit') -%>
2
<table width="100%">
3
  <tbody>
2 4
<% for journal in journals %>
3
  <div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
5
    <tr class="group open"><td>
6
    <div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
4 7
    <div id="note-<%= journal.indice %>">
5 8
    <h4><%= link_to "##{journal.indice}", {:anchor => "note-#{journal.indice}"}, :class => "journal-link" %>
6 9
    <%= avatar(journal.user, :size => "24") %>
10
    
11
    <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
7 12
    <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
13
    <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
14
                         "toggleAllRowGroups(this)", :class => 'toggle-all') %> 
15

  
8 16
    <%= content_tag('span', l(:field_is_private), :class => 'private') if journal.private_notes? %></h4>
9 17

  
18
    </td></tr>
19
    <tr><td>
10 20
    <% if journal.details.any? %>
11 21
    <ul class="details">
12 22
      <% details_to_strings(journal.visible_details).each do |string| %>
......
18 28
    </div>
19 29
  </div>
20 30
  <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
31
  </td></tr>
21 32
<% end %>
33
  </tbody>
34
</table>
22 35

  
23 36
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
app/views/issues/show.html.erb Wed Jan 07 11:26:01 2015 +0100
71 71
<% if @issue.description? || @issue.attachments.any? -%>
72 72
<hr />
73 73
<% if @issue.description? %>
74
<div class="description">
75
  <div class="contextual">
76
  <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
74
<table width="100%">
75
  <tbody>
76
    <tr class="group open"><td>
77
    <div class="description">
78
    <div class="contextual">
79
    <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
80
    </div>
81
  
82
    <p>
83
      <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
84
      <strong><%=l(:field_description)%></strong>
85
    </p>
86
  </td></tr>
87
  <tr><td>
88
    <div class="wiki">
89
    <%= textilizable @issue, :description, :attachments => @issue.attachments %>
90
    </div>
91
    </td></tr>
77 92
  </div>
78

  
79
  <p><strong><%=l(:field_description)%></strong></p>
80
  <div class="wiki">
81
  <%= textilizable @issue, :description, :attachments => @issue.attachments %>
82
  </div>
83
</div>
93
  </tbody>
94
</table> 
84 95
<% end %>
85 96
<%= link_to_attachments @issue, :thumbnails => true %>
86 97
<% end -%>