Project

General

Profile

RE: Help with comments view in redmine_issue_history_tabs... ยป _history.html.erb

Alfredo Pedraza, 2014-02-20 03:09

 
1
<% content_for :header_tags do%>
2
  <%= stylesheet_link_tag('issue_history_tabs.css', :plugin => :redmine_issue_history_tabs) %>
3
<%end%>
4

    
5
<% reply_links = authorize_for('issues', 'edit') -%>
6
<% tabs = [
7
	{:label => :label_history_tab_comments, :name => 'history_comments'},
8
	{:label => :label_history_tab_all, :name => 'history_all'}, 
9
	] %> 
10
<% selected_tab = params[:tab] ? params[:tab].to_s : 'history_comments' %> 
11

    
12
<div class="tabs">
13
<ul>
14
<% tabs.each do |tab| -%>
15
    <li><%= link_to l(tab[:label]), { :tab => tab[:name] },
16
                                    :id => "tab-#{tab[:name]}",
17
                                    :class => (tab[:name] != selected_tab ? nil : 'selected')%></li>
18
<% end -%>
19
</ul>
20
</div>
21

    
22
<% reply_links = authorize_for('issues', 'edit') -%>
23
<% for journal in journals %>
24
<% if selected_tab == 'history_all' || journal.css_classes.include?('has-notes')%>
25
  <div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
26
    <h4><%= link_to "##{journal.indice}", {:anchor => "note-#{journal.indice}"}, :class => "journal-link" %>
27
    <%= avatar(journal.user, :size => "24") %>
28
    <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
29
    <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %></h4>
30

    
31
    <% if journal.details.any? && selected_tab == 'history_all' %>
32
    <ul class="details">
33
      <% details_to_strings(journal.details).each do |string| %>
34
       <li><%= string %></li>
35
      <% end %>
36
    </ul>
37
    <% end %>
38
    <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
39
  </div>
40
  <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>  
41
<% end %>
42
<% end %>
43

    
44
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
45

    
    (1-1/1)