You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

projects.html.erb 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <div class="contextual">
  2. <%= link_to l(:label_project_new), new_project_path, :class => 'icon icon-add' %>
  3. </div>
  4. <%= title l(:label_project_plural) %>
  5. <%= form_tag({}, :method => :get) do %>
  6. <fieldset><legend><%= l(:label_filter_plural) %></legend>
  7. <label for='status'><%= l(:field_status) %>:</label>
  8. <%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
  9. <label for='name'><%= l(:label_project) %>:</label>
  10. <%= text_field_tag 'name', params[:name], :size => 30 %>
  11. <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
  12. <%= link_to l(:button_clear), admin_projects_path, :class => 'icon icon-reload' %>
  13. </fieldset>
  14. <% end %>
  15. &nbsp;
  16. <% if @projects.any? %>
  17. <div class="autoscroll">
  18. <table class="list">
  19. <thead><tr>
  20. <th><%=l(:label_project)%></th>
  21. <th><%=l(:field_is_public)%></th>
  22. <th><%=l(:field_created_on)%></th>
  23. <th></th>
  24. </tr></thead>
  25. <tbody>
  26. <% project_tree(@projects, :init_level => true) do |project, level| %>
  27. <tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
  28. <td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
  29. <td><%= checked_image project.is_public? %></td>
  30. <td><%= format_date(project.created_on) %></td>
  31. <td class="buttons">
  32. <%= link_to(l(:button_archive), archive_project_path(project, :status => params[:status]), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
  33. <%= link_to(l(:button_unarchive), unarchive_project_path(project, :status => params[:status]), :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
  34. <%= link_to(l(:button_copy), copy_project_path(project), :class => 'icon icon-copy') %>
  35. <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
  36. </td>
  37. </tr>
  38. <% end %>
  39. </tbody>
  40. </table>
  41. </div>
  42. <span class="pagination"><%= pagination_links_full @project_pages, @project_count %></span>
  43. <% else %>
  44. <p class="nodata"><%= l(:label_no_data) %></p>
  45. <% end %>