Defect #30125 » 30125.patch
| app/views/issues/_edit.html.erb | ||
|---|---|---|
| 47 | 47 |
<% if @issue.attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>
|
| 48 | 48 |
<div class="contextual"><%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %></div>
|
| 49 | 49 |
<div id="existing-attachments" style="<%= @issue.deleted_attachment_ids.blank? ? 'display:none;' : '' %>"> |
| 50 |
<table> |
|
| 50 | 51 |
<% @issue.attachments.each do |attachment| %> |
| 51 |
<span class="existing-attachment"> |
|
| 52 |
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %> |
|
| 53 |
<label> |
|
| 54 |
<%= check_box_tag 'issue[deleted_attachment_ids][]', |
|
| 55 |
attachment.id, |
|
| 56 |
@issue.deleted_attachment_ids.include?(attachment.id), |
|
| 57 |
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %> |
|
| 58 |
</label> |
|
| 59 |
</span> |
|
| 52 |
<tr class="existing-attachment"> |
|
| 53 |
<td> |
|
| 54 |
<span class="icon icon-attachment filename"><%= attachment.filename %></span> |
|
| 55 |
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
|
| 56 |
</td> |
|
| 57 |
<td><span class="description"><%= attachment.description unless attachment.description.blank? %></span></td> |
|
| 58 |
<td> |
|
| 59 |
<span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span> |
|
| 60 |
</td> |
|
| 61 |
<td> |
|
| 62 |
<label> |
|
| 63 |
<%= check_box_tag 'issue[deleted_attachment_ids][]', |
|
| 64 |
attachment.id, |
|
| 65 |
@issue.deleted_attachment_ids.include?(attachment.id), |
|
| 66 |
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %> |
|
| 67 |
</label> |
|
| 68 |
</td> |
|
| 69 |
</tr> |
|
| 60 | 70 |
<% end %> |
| 71 |
</table> |
|
| 61 | 72 |
<hr /> |
| 62 | 73 |
</div> |
| 63 | 74 |
<% end %> |
| app/views/wiki/edit.html.erb | ||
|---|---|---|
| 39 | 39 |
<% if @page.attachments.any? && @page.safe_attribute?('deleted_attachment_ids') %>
|
| 40 | 40 |
<div class="contextual"><%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %></div>
|
| 41 | 41 |
<div id="existing-attachments" style="<%= @page.deleted_attachment_ids.blank? ? 'display:none;' : '' %>"> |
| 42 |
<table> |
|
| 42 | 43 |
<% @page.attachments.each do |attachment| %> |
| 43 |
<span class="existing-attachment"> |
|
| 44 |
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %> |
|
| 45 |
<label class='inline'> |
|
| 46 |
<%= check_box_tag 'wiki_page[deleted_attachment_ids][]', |
|
| 47 |
attachment.id, |
|
| 48 |
@page.deleted_attachment_ids.include?(attachment.id), |
|
| 49 |
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %> |
|
| 50 |
</label> |
|
| 51 |
</span> |
|
| 44 |
<tr class="existing-attachment"> |
|
| 45 |
<td> |
|
| 46 |
<span class="icon icon-attachment filename"><%= attachment.filename %></span> |
|
| 47 |
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
|
| 48 |
</td> |
|
| 49 |
<td><span class="description"><%= attachment.description unless attachment.description.blank? %></span></td> |
|
| 50 |
<td> |
|
| 51 |
<span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span> |
|
| 52 |
</td> |
|
| 53 |
<td> |
|
| 54 |
<label class="inline"> |
|
| 55 |
<%= check_box_tag 'wiki_page[deleted_attachment_ids][]', |
|
| 56 |
attachment.id, |
|
| 57 |
@page.deleted_attachment_ids.include?(attachment.id), |
|
| 58 |
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %> |
|
| 59 |
</label> |
|
| 60 |
</td> |
|
| 61 |
</tr> |
|
| 52 | 62 |
<% end %> |
| 63 |
</table> |
|
| 53 | 64 |
<hr /> |
| 54 | 65 |
</div> |
| 55 | 66 |
<% end %> |
| public/stylesheets/application.css | ||
|---|---|---|
| 921 | 921 |
.check_box_group.bool_cf {border:0; background:inherit;}
|
| 922 | 922 |
.check_box_group.bool_cf label {display: inline;}
|
| 923 | 923 | |
| 924 |
.attachments_fields input.description, #existing-attachments input.description {margin-left:4px; width:340px;}
|
|
| 925 |
.attachments_fields>span, #existing-attachments>span {display:block; white-space:nowrap;}
|
|
| 926 |
.attachments_fields input.filename, #existing-attachments .filename {border:0; width:250px; color:#555; background-color:inherit; }
|
|
| 924 |
.attachments_fields input.description {margin-left:4px; width:340px;}
|
|
| 925 |
.attachments_fields>span {display:block; white-space:nowrap;}
|
|
| 926 |
.attachments_fields input.filename {border:0; width:250px; color:#555; background-color:inherit; }
|
|
| 927 | 927 |
.tabular input.filename {max-width:75% !important;}
|
| 928 | 928 |
.attachments_fields input.filename {height:1.8em;}
|
| 929 | 929 |
.attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
|
| 930 | 930 |
.attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
|
| 931 | 931 |
.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
|
| 932 |
.existing-attachment .filename {display:block; float:left; max-width:250px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
|
|
| 933 |
.existing-attachment .size {margin-left:2px;}
|
|
| 934 |
.existing-attachment .description {display:block; max-width:200px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
|
|
| 932 | 935 | |
| 933 | 936 |
a.remove-upload:hover {text-decoration:none !important;}
|
| 934 | 937 |
.existing-attachment.deleted .filename {text-decoration:line-through; color:#999 !important;}
|
- « Previous
- 1
- 2
- 3
- 4
- Next »