Permalink
Browse files

变更单查看页面样式的修改:

1、修改变更单审批页面样式;
  • Loading branch information...
1 parent 638768f commit b346934caffa5118e1330cd56fa346001d5e9ca9 @uudui uudui committed Apr 24, 2012
@@ -1,74 +1,16 @@
-
<% deletable = !@change_request.approve_status.present?||"ASSIGNED".eql?(@change_request.approve_status) %>
-<%= detail_data_table(datas.length) do %>
- <!-- irm datatable -->
- <div class="irm-datatable">
- <div>
- <table>
- <thead>
- <tr>
- <th style="width:40px">
- <div><%= t(:operation) %></div>
- </th>
- <th style="width:60px">
- <div><%= t(:label_irm_person_full_name) %></div>
- </th>
- <th>
- <div><%= t(:label_irm_person_organization) %></div>
- </th>
- <th>
- <div><%= t(:label_irm_person_email_address) %></div>
- </th>
- <th style="width:80px">
- <div><%= t(:label_chm_change_approval_approve_status) %></div>
- </th>
- <th style="width:180px">
- <div><%= t(:label_chm_change_approval_approve_at) %></div>
- </th>
- </tr>
- </thead>
- <tbody>
- <%datas.each do |data| %>
- <tr id="<%=data[:id]%>">
- <td>
- <div>
- <% if deletable%>
- <%= link_to t(:delete),{:controller => "chm/change_approvals",:id=>data.id,:action => "destroy"} ,{:back=>true,:method => :delete,:confirm => t(:label_are_you_sure) } %>
- <% elsif data.approve_able?(Irm::Person.current) %>
- <%= link_to t(:label_chm_change_approval_approve),{:controller => "chm/change_approvals",:id=>data.id,:action => "approve"} ,{:back=>true } %>
- <% end %>
- </div>
- </td>
- <td>
- <div>
- <%= data[:full_name] %>
- </div>
- </td>
- <td>
- <div>
- <%= data[:organization_name] %>
- </div>
- </td>
- <td>
- <div>
- <%= data[:email_address] %>
- </div>
- </td>
- <td>
- <div>
- <%= data[:approve_status_name] %>
- </div>
- </td>
- <td>
- <div>
- <%= format_date(data[:approve_at]) %>
- </div>
- </td>
- </tr>
- <% end %>
- </tbody>
- </table>
- </div>
- </div>
- <!-- end irm datatable -->
-<% end %>
+<%=datatable_view({:count=>datas.count,:datas=>datas}) do |builder|%>
+ <% builder.column(:id,{:title=>t(:operation),:width=>"40px"}) do |data|%>
+ <% if deletable %>
+ <%= link_to t(:delete),{:controller => "chm/change_approvals",:id=>data[:id],:action => "destroy"} ,{:back=>true,:method => :delete,:confirm => t(:label_are_you_sure) } %>
+ <% elsif data.approve_able?(Irm::Person.current) %>
+ <%= link_to t(:label_chm_change_approval_approve),{:controller => "chm/change_approvals",:id=>data[:id],:action => "approve"} ,{:back=>true } %>
+ <% end %>
+
+ <% end %>
+ <% builder.column(:full_name,{:title=>t(:label_irm_person_full_name)})%>
+ <% builder.column(:organization_name,{:title=>t(:label_irm_person_organization)})%>
+ <% builder.column(:email_address,{:title=>t(:label_irm_person_email_address)})%>
+ <% builder.column(:approve_status_name,{:title=>t(:label_chm_change_approval_approve_status)})%>
+ <% builder.column(:approve_at,{:title=>t(:label_chm_change_approval_approve_at)})%>
+<% end %>
@@ -1,18 +1,20 @@
-<%= page_block("approvals") do |pb| %>
- <%= pb.page_block_header({:title=>t(:label_chm_change_approval)}) do%>
- <td id="topButtonRow" class="pbButton">
+<div class="page-block">
+ <table class="page-block-header">
+ <tr>
+ <td class="page-block-title">
+ <h2 class="block-title"><%= t(:label_chm_change_approval) %></h2>
+ </td>
+ <td class="page-block-button">
<% if !@change_request.approve_status.present?||"ASSIGNED".eql?(@change_request.approve_status) %>
- <div class="button"><%= link_to(t(:new),{:controller=>"chm/change_approvals",:action=>"new",:change_request_id=>@change_request.id},:back=>true)%></div>
+ <%= link_to(t(:new),{:controller=>"chm/change_approvals",:action=>"new",:change_request_id=>@change_request.id},:back=>true,:class => "btn")%>
<% end %>
<% if "ASSIGNED".eql?(@change_request.approve_status) %>
- <div class="button"><%= link_to(t(:label_chm_change_approval_submit),{:controller=>"chm/change_approvals",:action=>"submit",:change_request_id=>@change_request.id},:back=>true)%></div>
+ <%= link_to(t(:label_chm_change_approval_submit),{:controller=>"chm/change_approvals",:action=>"submit",:change_request_id=>@change_request.id},:back=>true,:class => "btn")%>
<% end %>
</td>
- <td class="pbHelp">
- </td>
- <% end %>
-
- <%= pb.page_block_body do %>
- <%= render :partial=>"chm/change_approvals/approvals",:locals=>{:datas=>change_approvals(@change_request.id)} %>
- <% end %>
-<% end %>
+ </tr>
+ </table>
+ <div class="page-block-body">
+ <%= render :partial=>"chm/change_approvals/approvals",:locals=>{:datas=>change_approvals(@change_request.id)} %>
+ </div>
+</div>

0 comments on commit b346934

Please sign in to comment.