##// END OF EJS Templates
replaced deprecated human_size by number_to_human_size...
Jean-Philippe Lang -
r182:0d55613359d9
parent child
Show More
@@ -1,37 +1,37
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
4 </div>
4 </div>
5
5
6 <h2><%= @document.title %></h2>
6 <h2><%= @document.title %></h2>
7
7
8 <p><em><%= @document.category.name %><br />
8 <p><em><%= @document.category.name %><br />
9 <%= format_date @document.created_on %></em></p>
9 <%= format_date @document.created_on %></em></p>
10 <%= textilizable @document.description %>
10 <%= textilizable @document.description %>
11 <br />
11 <br />
12
12
13 <h3><%= l(:label_attachment_plural) %></h3>
13 <h3><%= l(:label_attachment_plural) %></h3>
14 <ul class="documents">
14 <ul class="documents">
15 <% for attachment in @attachments %>
15 <% for attachment in @attachments %>
16 <li>
16 <li>
17 <div class="contextual">
17 <div class="contextual">
18 <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
18 <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
19 </div>
19 </div>
20 <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
20 <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
21 (<%= human_size attachment.filesize %>)<br />
21 (<%= number_to_human_size attachment.filesize %>)<br />
22 <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
22 <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
23 <%= lwr(:label_download, attachment.downloads) %>
23 <%= lwr(:label_download, attachment.downloads) %>
24 </li>
24 </li>
25 <% end %>
25 <% end %>
26 </ul>
26 </ul>
27 <br />
27 <br />
28
28
29
29
30 <% if authorize_for('documents', 'add_attachment') %>
30 <% if authorize_for('documents', 'add_attachment') %>
31 <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
31 <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
32 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
32 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
33 <%= image_to_function "add.png", "addFileField();return false" %></label>
33 <%= image_to_function "add.png", "addFileField();return false" %></label>
34 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
34 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
35 <%= submit_tag l(:button_add) %>
35 <%= submit_tag l(:button_add) %>
36 <% end %>
36 <% end %>
37 <% end %>
37 <% end %>
@@ -1,100 +1,100
1 <% pdf.SetFont('Arial','B',11)
1 <% pdf.SetFont('Arial','B',11)
2 pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.long_id} - #{issue.subject}")
2 pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.long_id} - #{issue.subject}")
3 pdf.Ln
3 pdf.Ln
4
4
5 y0 = pdf.GetY
5 y0 = pdf.GetY
6
6
7 pdf.SetFont('Arial','B',9)
7 pdf.SetFont('Arial','B',9)
8 pdf.Cell(35,5, l(:field_status) + ":","LT")
8 pdf.Cell(35,5, l(:field_status) + ":","LT")
9 pdf.SetFont('Arial','',9)
9 pdf.SetFont('Arial','',9)
10 pdf.Cell(60,5, issue.status.name,"RT")
10 pdf.Cell(60,5, issue.status.name,"RT")
11 pdf.SetFont('Arial','B',9)
11 pdf.SetFont('Arial','B',9)
12 pdf.Cell(35,5, l(:field_priority) + ":","LT")
12 pdf.Cell(35,5, l(:field_priority) + ":","LT")
13 pdf.SetFont('Arial','',9)
13 pdf.SetFont('Arial','',9)
14 pdf.Cell(60,5, issue.priority.name,"RT")
14 pdf.Cell(60,5, issue.priority.name,"RT")
15 pdf.Ln
15 pdf.Ln
16
16
17 pdf.SetFont('Arial','B',9)
17 pdf.SetFont('Arial','B',9)
18 pdf.Cell(35,5, l(:field_author) + ":","L")
18 pdf.Cell(35,5, l(:field_author) + ":","L")
19 pdf.SetFont('Arial','',9)
19 pdf.SetFont('Arial','',9)
20 pdf.Cell(60,5, issue.author.name,"R")
20 pdf.Cell(60,5, issue.author.name,"R")
21 pdf.SetFont('Arial','B',9)
21 pdf.SetFont('Arial','B',9)
22 pdf.Cell(35,5, l(:field_category) + ":","L")
22 pdf.Cell(35,5, l(:field_category) + ":","L")
23 pdf.SetFont('Arial','',9)
23 pdf.SetFont('Arial','',9)
24 pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R")
24 pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R")
25 pdf.Ln
25 pdf.Ln
26
26
27 pdf.SetFont('Arial','B',9)
27 pdf.SetFont('Arial','B',9)
28 pdf.Cell(35,5, l(:field_created_on) + ":","L")
28 pdf.Cell(35,5, l(:field_created_on) + ":","L")
29 pdf.SetFont('Arial','',9)
29 pdf.SetFont('Arial','',9)
30 pdf.Cell(60,5, format_date(issue.created_on),"R")
30 pdf.Cell(60,5, format_date(issue.created_on),"R")
31 pdf.SetFont('Arial','B',9)
31 pdf.SetFont('Arial','B',9)
32 pdf.Cell(35,5, l(:field_assigned_to) + ":","L")
32 pdf.Cell(35,5, l(:field_assigned_to) + ":","L")
33 pdf.SetFont('Arial','',9)
33 pdf.SetFont('Arial','',9)
34 pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R")
34 pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R")
35 pdf.Ln
35 pdf.Ln
36
36
37 pdf.SetFont('Arial','B',9)
37 pdf.SetFont('Arial','B',9)
38 pdf.Cell(35,5, l(:field_updated_on) + ":","LB")
38 pdf.Cell(35,5, l(:field_updated_on) + ":","LB")
39 pdf.SetFont('Arial','',9)
39 pdf.SetFont('Arial','',9)
40 pdf.Cell(60,5, format_date(issue.updated_on),"RB")
40 pdf.Cell(60,5, format_date(issue.updated_on),"RB")
41 pdf.SetFont('Arial','B',9)
41 pdf.SetFont('Arial','B',9)
42 pdf.Cell(35,5, l(:field_due_date) + ":","LB")
42 pdf.Cell(35,5, l(:field_due_date) + ":","LB")
43 pdf.SetFont('Arial','',9)
43 pdf.SetFont('Arial','',9)
44 pdf.Cell(60,5, format_date(issue.due_date),"RB")
44 pdf.Cell(60,5, format_date(issue.due_date),"RB")
45 pdf.Ln
45 pdf.Ln
46
46
47 for custom_value in issue.custom_values
47 for custom_value in issue.custom_values
48 pdf.SetFont('Arial','B',9)
48 pdf.SetFont('Arial','B',9)
49 pdf.Cell(35,5, custom_value.custom_field.name + ":","L")
49 pdf.Cell(35,5, custom_value.custom_field.name + ":","L")
50 pdf.SetFont('Arial','',9)
50 pdf.SetFont('Arial','',9)
51 pdf.MultiCell(155,5, (show_value custom_value),"R")
51 pdf.MultiCell(155,5, (show_value custom_value),"R")
52 end
52 end
53
53
54 pdf.SetFont('Arial','B',9)
54 pdf.SetFont('Arial','B',9)
55 pdf.Cell(35,5, l(:field_subject) + ":","LTB")
55 pdf.Cell(35,5, l(:field_subject) + ":","LTB")
56 pdf.SetFont('Arial','',9)
56 pdf.SetFont('Arial','',9)
57 pdf.Cell(155,5, issue.subject,"RTB")
57 pdf.Cell(155,5, issue.subject,"RTB")
58 pdf.Ln
58 pdf.Ln
59
59
60 pdf.SetFont('Arial','B',9)
60 pdf.SetFont('Arial','B',9)
61 pdf.Cell(35,5, l(:field_description) + ":")
61 pdf.Cell(35,5, l(:field_description) + ":")
62 pdf.SetFont('Arial','',9)
62 pdf.SetFont('Arial','',9)
63 pdf.MultiCell(155,5, issue.description,"BR")
63 pdf.MultiCell(155,5, issue.description,"BR")
64
64
65 pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
65 pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
66 pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
66 pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
67
67
68 pdf.Ln
68 pdf.Ln
69
69
70 pdf.SetFont('Arial','B',9)
70 pdf.SetFont('Arial','B',9)
71 pdf.Cell(190,5, l(:label_history), "B")
71 pdf.Cell(190,5, l(:label_history), "B")
72 pdf.Ln
72 pdf.Ln
73 for journal in issue.journals.find(:all, :include => :user, :order => "journals.created_on desc")
73 for journal in issue.journals.find(:all, :include => :user, :order => "journals.created_on desc")
74 pdf.SetFont('Arial','B',8)
74 pdf.SetFont('Arial','B',8)
75 pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name)
75 pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name)
76 pdf.Ln
76 pdf.Ln
77 pdf.SetFont('Arial','I',8)
77 pdf.SetFont('Arial','I',8)
78 for detail in journal.details
78 for detail in journal.details
79 pdf.Cell(190,5, "- " + show_detail(detail, true))
79 pdf.Cell(190,5, "- " + show_detail(detail, true))
80 pdf.Ln
80 pdf.Ln
81 end
81 end
82 if journal.notes?
82 if journal.notes?
83 pdf.SetFont('Arial','',8)
83 pdf.SetFont('Arial','',8)
84 pdf.MultiCell(190,5, journal.notes)
84 pdf.MultiCell(190,5, journal.notes)
85 end
85 end
86 pdf.Ln
86 pdf.Ln
87 end
87 end
88
88
89 pdf.SetFont('Arial','B',9)
89 pdf.SetFont('Arial','B',9)
90 pdf.Cell(190,5, l(:label_attachment_plural), "B")
90 pdf.Cell(190,5, l(:label_attachment_plural), "B")
91 pdf.Ln
91 pdf.Ln
92 for attachment in issue.attachments
92 for attachment in issue.attachments
93 pdf.SetFont('Arial','',8)
93 pdf.SetFont('Arial','',8)
94 pdf.Cell(80,5, attachment.filename)
94 pdf.Cell(80,5, attachment.filename)
95 pdf.Cell(20,5, human_size(attachment.filesize),0,0,"R")
95 pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
96 pdf.Cell(20,5, format_date(attachment.created_on),0,0,"R")
96 pdf.Cell(20,5, format_date(attachment.created_on),0,0,"R")
97 pdf.Cell(70,5, attachment.author.name,0,0,"R")
97 pdf.Cell(70,5, attachment.author.name,0,0,"R")
98 pdf.Ln
98 pdf.Ln
99 end
99 end
100 %> No newline at end of file
100 %>
@@ -1,111 +1,111
1 <div class="contextual">
1 <div class="contextual">
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
3 </div>
3 </div>
4
4
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
6
6
7 <div class="box">
7 <div class="box">
8 <table width="100%">
8 <table width="100%">
9 <tr>
9 <tr>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
12 </tr>
12 </tr>
13 <tr>
13 <tr>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
16 </tr>
16 </tr>
17 <tr>
17 <tr>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
20 </tr>
20 </tr>
21 <tr>
21 <tr>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
24 </tr>
24 </tr>
25 <tr>
25 <tr>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
28 </tr>
28 </tr>
29 <tr>
29 <tr>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? @issue.fixed_version.name : "-" %></td>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? @issue.fixed_version.name : "-" %></td>
31 <td></td><td></td>
31 <td></td><td></td>
32 </tr>
32 </tr>
33 <tr>
33 <tr>
34 <% n = 0
34 <% n = 0
35 for custom_value in @custom_values %>
35 for custom_value in @custom_values %>
36 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%=h show_value custom_value %></td>
36 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%=h show_value custom_value %></td>
37 <% n = n + 1
37 <% n = n + 1
38 if (n > 1)
38 if (n > 1)
39 n = 0 %>
39 n = 0 %>
40 </tr><tr>
40 </tr><tr>
41 <%end
41 <%end
42 end %>
42 end %>
43 </tr>
43 </tr>
44 </table>
44 </table>
45 <hr />
45 <hr />
46 <br />
46 <br />
47
47
48 <b><%=l(:field_description)%> :</b><br /><br />
48 <b><%=l(:field_description)%> :</b><br /><br />
49 <%= textilizable @issue.description %>
49 <%= textilizable @issue.description %>
50 <br />
50 <br />
51
51
52 <div class="contextual">
52 <div class="contextual">
53 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
53 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
54 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
54 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
55 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
55 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
56 </div>
56 </div>
57
57
58 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
58 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
59 <% form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
59 <% form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
60 <%=l(:label_change_status)%> :
60 <%=l(:label_change_status)%> :
61 <select name="new_status_id">
61 <select name="new_status_id">
62 <%= options_from_collection_for_select @status_options, "id", "name" %>
62 <%= options_from_collection_for_select @status_options, "id", "name" %>
63 </select>
63 </select>
64 <%= submit_tag l(:button_change) %>
64 <%= submit_tag l(:button_change) %>
65 <% end %>
65 <% end %>
66 <% end %>
66 <% end %>
67 &nbsp;
67 &nbsp;
68 </div>
68 </div>
69
69
70 <div id="history" class="box">
70 <div id="history" class="box">
71 <h3><%=l(:label_history)%>
71 <h3><%=l(:label_history)%>
72 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
72 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
73 <%= render :partial => 'history', :locals => { :journals => @journals } %>
73 <%= render :partial => 'history', :locals => { :journals => @journals } %>
74 <% if @journals_count > @journals.length %>
74 <% if @journals_count > @journals.length %>
75 <p><center><small>[ <%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %> ]</small></center></p>
75 <p><center><small>[ <%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %> ]</small></center></p>
76 <% end %>
76 <% end %>
77 </div>
77 </div>
78
78
79 <div class="box">
79 <div class="box">
80 <h3><%=l(:label_attachment_plural)%></h3>
80 <h3><%=l(:label_attachment_plural)%></h3>
81 <table width="100%">
81 <table width="100%">
82 <% for attachment in @issue.attachments %>
82 <% for attachment in @issue.attachments %>
83 <tr>
83 <tr>
84 <td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= human_size(attachment.filesize) %>)</td>
84 <td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td>
85 <td><%= format_date(attachment.created_on) %></td>
85 <td><%= format_date(attachment.created_on) %></td>
86 <td><%= attachment.author.display_name %></td>
86 <td><%= attachment.author.display_name %></td>
87 <td><div class="contextual"><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %></div></td>
87 <td><div class="contextual"><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %></div></td>
88 </tr>
88 </tr>
89 <% end %>
89 <% end %>
90 </table>
90 </table>
91 <br />
91 <br />
92 <% if authorize_for('issues', 'add_attachment') %>
92 <% if authorize_for('issues', 'add_attachment') %>
93 <% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
93 <% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
94 <p id="attachments_p"><label><%=l(:label_attachment_new)%>
94 <p id="attachments_p"><label><%=l(:label_attachment_new)%>
95 <%= image_to_function "add.png", "addFileField();return false" %></label>
95 <%= image_to_function "add.png", "addFileField();return false" %></label>
96 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
96 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
97 <%= submit_tag l(:button_add) %>
97 <%= submit_tag l(:button_add) %>
98 <% end %>
98 <% end %>
99 <% end %>
99 <% end %>
100 </div>
100 </div>
101
101
102 <% if authorize_for('issues', 'add_note') %>
102 <% if authorize_for('issues', 'add_note') %>
103 <div class="box">
103 <div class="box">
104 <h3><%= l(:label_add_note) %></h3>
104 <h3><%= l(:label_add_note) %></h3>
105 <% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
105 <% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
106 <p><label for="notes"><%=l(:field_notes)%></label>
106 <p><label for="notes"><%=l(:field_notes)%></label>
107 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p>
107 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p>
108 <%= submit_tag l(:button_add) %>
108 <%= submit_tag l(:button_add) %>
109 <% end %>
109 <% end %>
110 </div>
110 </div>
111 <% end %>
111 <% end %>
@@ -1,15 +1,15
1 <h2><%=l(:label_document_new)%></h2>
1 <h2><%=l(:label_document_new)%></h2>
2
2
3 <% form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) do %>
3 <% form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) do %>
4 <%= render :partial => 'documents/form' %>
4 <%= render :partial => 'documents/form' %>
5
5
6 <div class="box">
6 <div class="box">
7 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
7 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
8 <%= image_to_function "add.png", "addFileField();return false" %></label>
8 <%= image_to_function "add.png", "addFileField();return false" %></label>
9 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
9 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
10 </div>
10 </div>
11
11
12 <%= submit_tag l(:button_create) %>
12 <%= submit_tag l(:button_create) %>
13 <% end %>
13 <% end %>
14
14
15
15
@@ -1,15 +1,15
1 <h2><%=l(:label_attachment_new)%></h2>
1 <h2><%=l(:label_attachment_new)%></h2>
2
2
3 <%= error_messages_for 'attachment' %>
3 <%= error_messages_for 'attachment' %>
4 <div class="box">
4 <div class="box">
5 <% form_tag({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") do %>
5 <% form_tag({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") do %>
6
6
7 <p><label for="version_id"><%=l(:field_version)%> <span class="required">*</span></label>
7 <p><label for="version_id"><%=l(:field_version)%> <span class="required">*</span></label>
8 <%= select_tag "version_id", options_from_collection_for_select(@versions, "id", "name") %></p>
8 <%= select_tag "version_id", options_from_collection_for_select(@versions, "id", "name") %></p>
9
9
10 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
10 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
11 <%= image_to_function "add.png", "addFileField();return false" %></label>
11 <%= image_to_function "add.png", "addFileField();return false" %></label>
12 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
12 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
13 </div>
13 </div>
14 <%= submit_tag l(:button_add) %>
14 <%= submit_tag l(:button_add) %>
15 <% end %> No newline at end of file
15 <% end %>
@@ -1,57 +1,57
1 <h2><%=l(:label_issue_new)%>: <%= @tracker.name %></h2>
1 <h2><%=l(:label_issue_new)%>: <%= @tracker.name %></h2>
2
2
3 <% labelled_tabular_form_for :issue, @issue, :url => {:action => 'add_issue'}, :html => {:multipart => true} do |f| %>
3 <% labelled_tabular_form_for :issue, @issue, :url => {:action => 'add_issue'}, :html => {:multipart => true} do |f| %>
4 <%= error_messages_for 'issue' %>
4 <%= error_messages_for 'issue' %>
5 <div class="box">
5 <div class="box">
6 <!--[form:issue]-->
6 <!--[form:issue]-->
7 <%= hidden_field_tag 'tracker_id', @tracker.id %>
7 <%= hidden_field_tag 'tracker_id', @tracker.id %>
8
8
9 <div class="splitcontentleft">
9 <div class="splitcontentleft">
10 <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
10 <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
11 <p><%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %></p>
11 <p><%= f.select :assigned_to_id, (@issue.project.members.collect {|m| [m.name, m.user_id]}), :include_blank => true %></p>
12 <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %></p>
12 <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %></p>
13 </div>
13 </div>
14 <div class="splitcontentright">
14 <div class="splitcontentright">
15 <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p>
15 <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p>
16 <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p>
16 <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p>
17 <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
17 <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
18 </div>
18 </div>
19
19
20 <div class="clear">
20 <div class="clear">
21 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
21 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
22 <p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true %></p>
22 <p><%= f.text_area :description, :cols => 60, :rows => 10, :required => true %></p>
23
23
24 <% for @custom_value in @custom_values %>
24 <% for @custom_value in @custom_values %>
25 <p><%= custom_field_tag_with_label @custom_value %></p>
25 <p><%= custom_field_tag_with_label @custom_value %></p>
26 <% end %>
26 <% end %>
27
27
28 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
28 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
29 <%= image_to_function "add.png", "addFileField();return false" %></label>
29 <%= image_to_function "add.png", "addFileField();return false" %></label>
30 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
30 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
31
31
32 </div>
32 </div>
33 <!--[eoform:issue]-->
33 <!--[eoform:issue]-->
34 </div>
34 </div>
35 <%= submit_tag l(:button_create) %>
35 <%= submit_tag l(:button_create) %>
36 <% end %>
36 <% end %>
37
37
38 <% if Setting.text_formatting == 'textile' %>
38 <% if Setting.text_formatting == 'textile' %>
39 <%= javascript_include_tag 'jstoolbar' %>
39 <%= javascript_include_tag 'jstoolbar' %>
40 <script type="text/javascript">
40 <script type="text/javascript">
41 //<![CDATA[
41 //<![CDATA[
42 if (document.getElementById) {
42 if (document.getElementById) {
43 if (document.getElementById('issue_description')) {
43 if (document.getElementById('issue_description')) {
44 var commentTb = new jsToolBar(document.getElementById('issue_description'));
44 var commentTb = new jsToolBar(document.getElementById('issue_description'));
45 commentTb.draw();
45 commentTb.draw();
46 }
46 }
47 }
47 }
48 //]]>
48 //]]>
49 </script>
49 </script>
50 <% end %>
50 <% end %>
51
51
52 <% content_for :header_tags do %>
52 <% content_for :header_tags do %>
53 <%= javascript_include_tag 'calendar/calendar' %>
53 <%= javascript_include_tag 'calendar/calendar' %>
54 <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
54 <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
55 <%= javascript_include_tag 'calendar/calendar-setup' %>
55 <%= javascript_include_tag 'calendar/calendar-setup' %>
56 <%= stylesheet_link_tag 'calendar' %>
56 <%= stylesheet_link_tag 'calendar' %>
57 <% end %> No newline at end of file
57 <% end %>
@@ -1,44 +1,44
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %>
2 <%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_attachment_plural)%></h2>
5 <h2><%=l(:label_attachment_plural)%></h2>
6
6
7 <% delete_allowed = authorize_for('versions', 'destroy_file') %>
7 <% delete_allowed = authorize_for('versions', 'destroy_file') %>
8
8
9 <table class="list">
9 <table class="list">
10 <thead><tr>
10 <thead><tr>
11 <th><%=l(:field_version)%></th>
11 <th><%=l(:field_version)%></th>
12 <th><%=l(:field_filename)%></th>
12 <th><%=l(:field_filename)%></th>
13 <th><%=l(:label_date)%></th>
13 <th><%=l(:label_date)%></th>
14 <th><%=l(:field_filesize)%></th>
14 <th><%=l(:field_filesize)%></th>
15 <th>D/L</th>
15 <th>D/L</th>
16 <th>MD5</th>
16 <th>MD5</th>
17 <% if delete_allowed %><th></th><% end %>
17 <% if delete_allowed %><th></th><% end %>
18 </tr></thead>
18 </tr></thead>
19 <tbody>
19 <tbody>
20 <% for version in @versions %>
20 <% for version in @versions %>
21 <% unless version.attachments.empty? %>
21 <% unless version.attachments.empty? %>
22 <tr><th colspan="7" align="left"><span class="icon icon-package"><b><%= version.name %></b></span></th></tr>
22 <tr><th colspan="7" align="left"><span class="icon icon-package"><b><%= version.name %></b></span></th></tr>
23 <% for file in version.attachments %>
23 <% for file in version.attachments %>
24 <tr class="<%= cycle("odd", "even") %>">
24 <tr class="<%= cycle("odd", "even") %>">
25 <td></td>
25 <td></td>
26 <td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td>
26 <td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td>
27 <td align="center"><%= format_date(file.created_on) %></td>
27 <td align="center"><%= format_date(file.created_on) %></td>
28 <td align="center"><%= human_size(file.filesize) %></td>
28 <td align="center"><%= number_to_human_size(file.filesize) %></td>
29 <td align="center"><%= file.downloads %></td>
29 <td align="center"><%= file.downloads %></td>
30 <td align="center"><small><%= file.digest %></small></td>
30 <td align="center"><small><%= file.digest %></small></td>
31 <% if delete_allowed %>
31 <% if delete_allowed %>
32 <td align="center">
32 <td align="center">
33 <div class="contextual">
33 <div class="contextual">
34 <%= link_to_if_authorized '', {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
34 <%= link_to_if_authorized '', {:controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
35 </div>
35 </div>
36 </td>
36 </td>
37 <% end %>
37 <% end %>
38 </tr>
38 </tr>
39 <% end
39 <% end
40 reset_cycle %>
40 reset_cycle %>
41 <% end %>
41 <% end %>
42 <% end %>
42 <% end %>
43 </tbody>
43 </tbody>
44 </table> No newline at end of file
44 </table>
@@ -1,23 +1,23
1 <table class="list">
1 <table class="list">
2 <thead><tr>
2 <thead><tr>
3 <th><%= l(:field_name) %></th>
3 <th><%= l(:field_name) %></th>
4 <th><%= l(:field_filesize) %></th>
4 <th><%= l(:field_filesize) %></th>
5 <th><%= l(:label_revision) %></th>
5 <th><%= l(:label_revision) %></th>
6 <th><%= l(:field_author) %></th>
6 <th><%= l(:field_author) %></th>
7 <th><%= l(:label_date) %></th>
7 <th><%= l(:label_date) %></th>
8 </tr></thead>
8 </tr></thead>
9 <tbody>
9 <tbody>
10 <% total_size = 0
10 <% total_size = 0
11 @entries.each do |entry| %>
11 @entries.each do |entry| %>
12 <tr class="<%= cycle 'odd', 'even' %>">
12 <tr class="<%= cycle 'odd', 'even' %>">
13 <td><%= link_to h(entry.name), { :action => (entry.is_dir? ? 'browse' : 'revisions'), :id => @project, :path => entry.path, :rev => @rev }, :class => ("icon " + (entry.is_dir? ? 'icon-folder' : 'icon-file')) %></td>
13 <td><%= link_to h(entry.name), { :action => (entry.is_dir? ? 'browse' : 'revisions'), :id => @project, :path => entry.path, :rev => @rev }, :class => ("icon " + (entry.is_dir? ? 'icon-folder' : 'icon-file')) %></td>
14 <td align="right"><%= human_size(entry.size) unless entry.is_dir? %></td>
14 <td align="right"><%= number_to_human_size(entry.size) unless entry.is_dir? %></td>
15 <td align="right"><%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %></td>
15 <td align="right"><%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %></td>
16 <td align="center"><em><%=h entry.lastrev.author %></em></td>
16 <td align="center"><em><%=h entry.lastrev.author %></em></td>
17 <td align="center"><%= format_time(entry.lastrev.time) %></td>
17 <td align="center"><%= format_time(entry.lastrev.time) %></td>
18 </tr>
18 </tr>
19 <% total_size += entry.size
19 <% total_size += entry.size
20 end %>
20 end %>
21 </tbody>
21 </tbody>
22 </table>
22 </table>
23 <p class="textright"><em><%= l(:label_total) %>: <%= human_size(total_size) %></em></p> No newline at end of file
23 <p class="textright"><em><%= l(:label_total) %>: <%= number_to_human_size(total_size) %></em></p> No newline at end of file
@@ -1,41 +1,41
1 <div class="contextual">
1 <div class="contextual">
2 <% form_tag do %>
2 <% form_tag do %>
3 <p><%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
3 <p><%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
4 <%= submit_tag 'OK' %></p>
4 <%= submit_tag 'OK' %></p>
5 <% end %>
5 <% end %>
6 </div>
6 </div>
7
7
8 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => @entry.kind, :revision => @rev } %></h2>
8 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => @entry.kind, :revision => @rev } %></h2>
9
9
10 <% if @entry.is_file? %>
10 <% if @entry.is_file? %>
11 <h3><%=h @entry.name %></h3>
11 <h3><%=h @entry.name %></h3>
12 <p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= human_size @entry.size %>)</p>
12 <p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= number_to_human_size @entry.size %>)</p>
13 <% end %>
13 <% end %>
14
14
15 <h3>Revisions</h3>
15 <h3>Revisions</h3>
16
16
17 <table class="list">
17 <table class="list">
18 <thead><tr>
18 <thead><tr>
19 <th>#</th>
19 <th>#</th>
20 <th><%= l(:field_author) %></th>
20 <th><%= l(:field_author) %></th>
21 <th><%= l(:label_date) %></th>
21 <th><%= l(:label_date) %></th>
22 <th><%= l(:field_description) %></th>
22 <th><%= l(:field_description) %></th>
23 <th></th>
23 <th></th>
24 </tr></thead>
24 </tr></thead>
25 <tbody>
25 <tbody>
26 <% @revisions.each do |revision| %>
26 <% @revisions.each do |revision| %>
27 <tr class="<%= cycle 'odd', 'even' %>">
27 <tr class="<%= cycle 'odd', 'even' %>">
28 <th align="center"><%= link_to revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier %></th>
28 <th align="center"><%= link_to revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier %></th>
29 <td align="center"><em><%=h revision.author %></em></td>
29 <td align="center"><em><%=h revision.author %></em></td>
30 <td align="center"><%= format_time(revision.time) %></td>
30 <td align="center"><%= format_time(revision.time) %></td>
31 <td style="width:70%"><%= textilizable(revision.message) %></td>
31 <td style="width:70%"><%= textilizable(revision.message) %></td>
32 <td align="center"><%= link_to 'Diff', :action => 'diff', :id => @project, :path => @path, :rev => revision.identifier if @entry.is_file? && revision != @revisions.last %></td>
32 <td align="center"><%= link_to 'Diff', :action => 'diff', :id => @project, :path => @path, :rev => revision.identifier if @entry.is_file? && revision != @revisions.last %></td>
33 </tr>
33 </tr>
34 <% end %>
34 <% end %>
35 </tbody>
35 </tbody>
36 </table>
36 </table>
37 <p><%= lwr(:label_modification, @revisions.length) %></p>
37 <p><%= lwr(:label_modification, @revisions.length) %></p>
38
38
39 <% content_for :header_tags do %>
39 <% content_for :header_tags do %>
40 <%= stylesheet_link_tag "scm" %>
40 <%= stylesheet_link_tag "scm" %>
41 <% end %> No newline at end of file
41 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now