* finished Issue 3: Include icons for most common file types
git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@59 5e329b0b-a2ee-ea63-e329-299493fc886d
@ -41,4 +41,14 @@ module DmsfHelper
|
||||
just_filename.gsub(/[^\w\.\-]/,'_')
|
||||
end
|
||||
|
||||
def self.filetype_css(filename)
|
||||
extension = File.extname(filename)
|
||||
extension = extension[1, extension.length-1]
|
||||
if File.exists?("#{File.dirname(__FILE__)}/../../assets/images/filetypes/#{extension}.png")
|
||||
return "filetype-#{extension}";
|
||||
else
|
||||
return Redmine::MimeType.css_class_of(filename)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -93,7 +93,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
|
||||
<td class="title">
|
||||
<%= link_to(h(file.last_revision.display_title),
|
||||
{:action => "download_file", :id => @project, :file_id => file},
|
||||
:class => "icon icon-file #{Redmine::MimeType.css_class_of(file.name)}",
|
||||
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}",
|
||||
:title => l(:title_title_version_version_download, :title => h(file.last_revision.title), :version => file.last_revision.version)) %>
|
||||
<div class="filename"><%= h(file.display_name) %></div>
|
||||
</td>
|
||||
|
||||
BIN
assets/images/filetypes/doc.png
Normal file
|
After Width: | Height: | Size: 671 B |
BIN
assets/images/filetypes/docx.png
Normal file
|
After Width: | Height: | Size: 671 B |
BIN
assets/images/filetypes/mpp.png
Normal file
|
After Width: | Height: | Size: 717 B |
BIN
assets/images/filetypes/odg.png
Normal file
|
After Width: | Height: | Size: 803 B |
BIN
assets/images/filetypes/odp.png
Normal file
|
After Width: | Height: | Size: 759 B |
BIN
assets/images/filetypes/ods.png
Normal file
|
After Width: | Height: | Size: 764 B |
BIN
assets/images/filetypes/odt.png
Normal file
|
After Width: | Height: | Size: 719 B |
BIN
assets/images/filetypes/ppt.png
Normal file
|
After Width: | Height: | Size: 775 B |
BIN
assets/images/filetypes/pptx.png
Normal file
|
After Width: | Height: | Size: 775 B |
BIN
assets/images/filetypes/vsd.png
Normal file
|
After Width: | Height: | Size: 698 B |
BIN
assets/images/filetypes/vsdx.png
Normal file
|
After Width: | Height: | Size: 698 B |
BIN
assets/images/filetypes/xls.png
Normal file
|
After Width: | Height: | Size: 744 B |
BIN
assets/images/filetypes/xlsx.png
Normal file
|
After Width: | Height: | Size: 744 B |
@ -1,3 +1,4 @@
|
||||
/* DMSF entries list */
|
||||
table.entries tbody td, table.entries tbody tr:hover td {
|
||||
border: solid 1px #D7D7D7;
|
||||
}
|
||||
@ -24,14 +25,40 @@ table.entries th.check {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#sidebar h3 {
|
||||
border: none;
|
||||
.icon-file.filetype-doc, .icon-file.filetype-docx {
|
||||
background-image: url(../images/filetypes/doc.png);
|
||||
}
|
||||
|
||||
button {
|
||||
vertical-align: middle;
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
.icon-file.filetype-xls, .icon-file.filetype-xlsx {
|
||||
background-image: url(../images/filetypes/xls.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-ppt, .icon-file.filetype-pptx {
|
||||
background-image: url(../images/filetypes/ppt.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-vsd, .icon-file.filetype-vsdx {
|
||||
background-image: url(../images/filetypes/vsd.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-mpp {
|
||||
background-image: url(../images/filetypes/mpp.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-odt {
|
||||
background-image: url(../images/filetypes/odt.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-ods {
|
||||
background-image: url(../images/filetypes/ods.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-odp {
|
||||
background-image: url(../images/filetypes/odp.png);
|
||||
}
|
||||
|
||||
.icon-file.filetype-odg {
|
||||
background-image: url(../images/filetypes/odg.png);
|
||||
}
|
||||
|
||||
form.dmfs_entries {
|
||||
@ -47,6 +74,10 @@ form.dmfs_entries div.controls input, form.dmfs_entries div.controls button {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
div.filename {
|
||||
padding: 0 10px 0 10px; float: right; font-size: 0.8em;
|
||||
white-space: nowrap;
|
||||
@ -78,6 +109,8 @@ td.version img {
|
||||
vertical-align:text-top;
|
||||
}
|
||||
|
||||
/* DMSF entries list icons */
|
||||
|
||||
div.right_icon_box {
|
||||
float: right;
|
||||
white-space: nowrap;
|
||||
@ -88,6 +121,7 @@ div.right_icon_box img.detail_icon {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* DMSF entries upload control */
|
||||
|
||||
.dmsf_upload textarea {
|
||||
width: 90%;
|
||||
@ -101,38 +135,6 @@ div.right_icon_box img.detail_icon {
|
||||
padding: 4px 4px 4px 30px;
|
||||
}
|
||||
|
||||
.dmsf_detail legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dmsf_detail .warning {
|
||||
padding: 4px 4px 4px 30px;
|
||||
}
|
||||
|
||||
.dmsf_detail div.data {
|
||||
margin-left: 110px;
|
||||
}
|
||||
|
||||
.dmsf_detail label {
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
p.no-ident {
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
padding-top: 4px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
#uploader div.flash {
|
||||
border: none;
|
||||
}
|
||||
@ -153,10 +155,6 @@ div.upload_select input, div.upload_select select {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.plupload_scroll {
|
||||
max-height: 1000px;
|
||||
min-height: 175px;
|
||||
@ -166,3 +164,25 @@ input[type="checkbox"] {
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
/* DMSF detail/commit page */
|
||||
|
||||
.dmsf_detail .warning {
|
||||
padding: 4px 4px 4px 30px;
|
||||
}
|
||||
|
||||
.dmsf_detail div.data {
|
||||
margin-left: 110px;
|
||||
}
|
||||
|
||||
.dmsf_detail label {
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
p.no-ident {
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||