modified table style

This commit is contained in:
nieguanghui 2014-01-13 16:29:02 +08:00
parent 3d2c0ba721
commit 405cf70b42
2 changed files with 66 additions and 15 deletions

View File

@ -1,4 +1,53 @@
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 --> <!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
<style>
table {
line-height: 25px;
font-size: 14px;
}
#ver-zebra
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
margin: 20px;
width: 98%;
text-align: left;
border-collapse: collapse;
}
#ver-zebra th
{
font-size: 14px;
font-weight: normal;
padding: 12px 15px;
border-right: 1px solid #fff;
border-left: 1px solid #fff;
color: #039;
}
#ver-zebra td
{
padding: 8px 15px;
border-right: 1px solid #fff;
border-left: 1px solid #fff;
color: #669;
}
.vzebra-odd
{
background: #eff2ff;
}
.vzebra-even
{
background: #e8edff;
}
#ver-zebra #vzebra-adventure, #ver-zebra #vzebra-children
{
background: #ffffff;
border-bottom: 1px solid #c8d4fd;
}
#ver-zebra #vzebra-comedy, #ver-zebra #vzebra-action
{
background: #ffffff;
border-bottom: 1px solid #d6dfff;
}
</style>
<div class="content-title-top"> <div class="content-title-top">
<% if @project.project_type == 1 %> <% if @project.project_type == 1 %>
@ -14,14 +63,20 @@
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<table class="list files"> <table class="list files" id="ver-zebra">
<colgroup>
<col class="vzebra-odd" />
<col class="vzebra-even" />
<col class="vzebra-odd" />
<col class="vzebra-even" />
</colgroup>
<thead><tr> <thead><tr>
<%= sort_header_tag('filename', :caption => l(:field_filename)) %> <%= sort_header_tag('filename', :caption => l(:field_filename), :scope =>"col" , :id => "vzebra-adventure")%>
<%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope =>"col" , :id => "vzebra-comedy")%>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope =>"col", :id=> "vzebra-children")%>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc') %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope =>"col", :id => "vzebra-action") %>
<%= sort_header_tag('description', :caption => l(:field_description)) %> <%= sort_header_tag('downloads', :caption => "操作", :scope =>"col", :id => "vzebra-children") %>
<th></th> <!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr></thead> </tr></thead>
<tbody> <tbody>
<% @containers.each do |container| %> <% @containers.each do |container| %>
@ -39,7 +94,7 @@
<td class="created_on"><%= format_time(file.created_on) %></td> <td class="created_on"><%= format_time(file.created_on) %></td>
<td class="filesize"><%= number_to_human_size(file.filesize) %></td> <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="downloads"><%= file.downloads %></td> <td class="downloads"><%= file.downloads %></td>
<td class="digest" width="300px"><%= file.description %></td> <!-- <td class="digest" width="300px"><%= file.description %></td> -->
<td align="center"> <td align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file), <%= link_to(image_tag('delete.png'), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>

View File

@ -23,7 +23,7 @@
} }
.line_block p{ .line_block p{
margin: 1em 0px auto; margin: 1em 0px auto;
background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent; /*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
border-bottom: 1px solid rgb(226,226,226); border-bottom: 1px solid rgb(226,226,226);
border-top-left-radius : 6px; border-top-left-radius : 6px;
border-top-right-radius : 6px; border-top-right-radius : 6px;
@ -34,7 +34,7 @@
height: 30px; height: 30px;
font-size: 1.5em; font-size: 1.5em;
padding-left: 4%; padding-left: 4%;
border-bottom: 2px solid #FF661B border-bottom: 1px solid rgb(21, 165, 200);
} }
.resource_sum, .line_blo{ .resource_sum, .line_blo{
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
@ -43,7 +43,7 @@
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
} }
.line_block table thead tr{ .line_block table thead tr{
background-color: #d1d1d1; /*background-color: #d1d1d1;*/
} }
.line_block table td{ .line_block table td{
height: 2em; height: 2em;
@ -59,10 +59,6 @@
</div> </div>
<% end %> <% end %>
<% content_for :sidebar do%>
this is sidebar in index.html.erb
<% end %>
<div class="resource_sum"> <div class="resource_sum">
<% 4.times do |c|%> <% 4.times do |c|%>
<div class="line_block"> <div class="line_block">