| app/views/releases/index.rhtml | |
| 1 | @@ -1,3 +1,15 @@ |
| 1 | <script type="text/javascript"> |
| 2 | $(function() { |
| 3 | $('.show_link').click(function() { |
| 4 | link_id = "#" + this.id |
| 5 | $(link_id).text($(link_id).text() == '(Show files)' ? '(Hide file)' : '(Show files)'); |
| 6 | files_id = link_id.replace(/-link/, '-files') |
| 7 | $(files_id).toggle(); |
| 8 | return false; |
| 9 | }); |
| 10 | }); |
| 11 | </script> |
| 12 | |
| 13 | <%= wiki_html(@project, @project.wiki_page('Files'), @project.wiki_page('Files')) %> |
| 14 | |
| 15 | <h3><%= 'Project releases' %></h3> |
| ... | |
| 24 | @@ -12,17 +24,12 @@ |
| 24 | <% @phases.each do |phase| %> |
| 25 | <% if not phase.file_infos.empty? %> |
| 26 | <h4><%= '%s released %s' % [h(phase.name), format_date(phase.released_at)] %></h4> |
| 15 | |
| 28 | <% if not first %> |
| 17 | <a href="#" id="phase<%= phase.id %>-link" style="display: block;" |
| 18 | onclick="$('phase<%= phase.id %>-link').hide(); Effect.BlindDown('phase<%= phase.id %>-files'); |
| 19 | return false;"> |
| 20 | (Show files) |
| 21 | </a> |
| 34 | <a href="#" id="phase<%= phase.id %>-link" class="show_link">(Show files)</a> |
| 35 | <% end %> |
| 24 | |
| 25 | <table id="phase<%= phase.id %>-files" class="data" cellspacing="0" |
| 26 | <% if first %><% first = false %><% else %>style="display: none;"<% end %>> |
| 39 | <div id="phase<%= phase.id %>-files" |
| 40 | <% if first %><% first = false %><% else %>style="display: none;"<% end %>> |
| 41 | <table class="data" cellspacing="0"> |
| 42 | <thead> |
| 43 | <tr> |
| 44 | <th width="80%"><%= 'File' %></th> |
| ... | |
| 52 | @@ -45,6 +52,7 @@ |
| 52 | <% end %> |
| 53 | </tbody> |
| 54 | </table> |
| 55 | </div> |
| 56 | <% end %> |
| 57 | <% end %> |
| 58 | <% end %> |
| ... | |