1、调整admin界面项目列表显示样式

2、项目列表增加序号
tmp
sw 10 years ago
parent f9880a00fd
commit d48a733502

@ -1,5 +1,5 @@
<div class="contextual"> <div class="contextual">
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %> <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
</div> </div>
<h3> <h3>
@ -7,62 +7,70 @@
</h3> </h3>
<%= form_tag({}, :method => :get) do %> <%= form_tag({}, :method => :get) do %>
<fieldset> <fieldset>
<legend> <legend>
<%= l(:label_filter_plural) %> <%= l(:label_filter_plural) %>
</legend> </legend>
<label for='status'> <label for='status'>
<%= l(:field_status) %> : <%= l(:field_status) %> :
</label> </label>
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %> <%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
<label for='name'> <label for='name'>
<%= l(:label_project) %>: <%= l(:label_project) %>:
</label> </label>
<%= text_field_tag 'name', params[:name], :size => 30 %> <%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:button_apply), :class => "small", :name => nil %> <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %> <%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
</fieldset> </fieldset>
<% end %> <% end %>
&nbsp; &nbsp;
<div class="autoscroll"> <div class="autoscroll">
<table class="list" style="width: 100%;table-layout: fixed"> <table class="list" style="width: 100%;table-layout: fixed">
<thead><tr> <thead>
<th> <tr>
<%=l(:label_project)%> <th style="width: 30px;">
</th> 序号
<th> </th>
<%=l(:field_is_public)%> <th style="width: 120px;">
</th> <%=l(:label_project)%>
<th> </th>
<%=l(:field_created_on)%> <th style="width: 20px;">
</th> <%=l(:field_is_public)%>
<th></th> </th>
</tr></thead> <th style="width: 30px;">
<tbody> <%=l(:field_created_on)%>
<% project_tree(@projects) do |project, level| %> </th>
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> <th style="width: 70px;"></th>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'> </tr>
<span> </thead>
<%= link_to_project_settings(project, {}) %> <tbody>
</span> <% project_tree(@projects) do |project, level| %>
</td> <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td align="center"> <td style="text-align: center;">
<%= checked_image project.is_public? %> <%= project.id %>
</td> </td>
<td align="center"> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'>
<%= format_date(project.created_on) %> <span>
</td> <%= link_to_project_settings(project, {}) %>
<td class="buttons"> </span>
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> </td>
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> <td align="center">
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %> <%= checked_image project.is_public? %>
<%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %> </td>
</td> <td align="center">
</tr> <%= format_date(project.created_on) %>
<% end %> </td>
</tbody> <td class="buttons">
</table> <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
<%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div> </div>
<% html_title(l(:label_project_plural)) -%> <% html_title(l(:label_project_plural)) -%>

Loading…
Cancel
Save