From 5c71d7e8bed4792c3ff59ea033bc4ff50b2dcf25 Mon Sep 17 00:00:00 2001 From: nwb Date: Fri, 16 May 2014 15:30:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E8=B5=84=E6=BA=90=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=AF=BE=E4=BB=B6=202.=E8=B0=83=E6=95=B4=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_new.html.erb | 2 +- app/views/files/_show_all_attachment.html.erb | 8 +++---- app/views/files/_sort_by_attachtypel.html.erb | 21 +++++++++---------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/views/files/_new.html.erb b/app/views/files/_new.html.erb index 4c1b97fa..6e9e1853 100644 --- a/app/views/files/_new.html.erb +++ b/app/views/files/_new.html.erb @@ -15,7 +15,7 @@

<%= select_tag "attachment_type", options_from_collection_for_select(attachmenttypes, "id", - "typeName") %> + "typeName",2) %>

<% end %> diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 07dc6a27..d34f95f7 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -20,6 +20,7 @@ <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> + <%= sort_header_tag('tags', :caption => l(:label_tag), :id => "vzebra-tag") %> @@ -51,15 +52,14 @@ <%= link_to(image_tag('delete.png'), attachment_path(file), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> - - - +
<%# @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %> <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %>
- + <% end -%> diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb index 01c57c49..9df26d7e 100644 --- a/app/views/files/_sort_by_attachtypel.html.erb +++ b/app/views/files/_sort_by_attachtypel.html.erb @@ -20,6 +20,7 @@ <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope =>"col", :id=> "vzebra-contenttype")%> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> + <%= sort_header_tag('tags', :caption => l(:label_tag), :id => "vzebra-tag") %> @@ -47,17 +48,15 @@ <%= link_to(image_tag('delete.png'), attachment_path(file), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> - - - -
- <%# @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %> - <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %> -
-
- - + +
+ <%# @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %> + <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"} %> +
+
+ + <% end -%> <% end -%> From 8f153520b4a4ef6f3662c20b7cb3da2d923f6ade Mon Sep 17 00:00:00 2001 From: nwb Date: Fri, 16 May 2014 16:29:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_new.html.erb | 37 +++++++++++++++++++----------- config/locales/zh.yml | 2 +- public/stylesheets/application.css | 2 +- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app/views/files/_new.html.erb b/app/views/files/_new.html.erb index 6e9e1853..9d62ca37 100644 --- a/app/views/files/_new.html.erb +++ b/app/views/files/_new.html.erb @@ -5,21 +5,32 @@ <%= form_tag(project_files_path(project), :multipart => true, :class => "tabular") do %>
-<% if versions.any? %> -

-<%= select_tag "version_id", content_tag('option', '') + - options_from_collection_for_select(versions, "id", "name") %>

-<% end %> +

+ + + <% if versions.any? %> + + + <% end %> - <% if attachmenttypes.any? %> -

- <%= select_tag "attachment_type", - options_from_collection_for_select(attachmenttypes, "id", - "typeName",2) %> -

- <% end %> + <% if attachmenttypes.any? %> + + + <% end %> + +

<%= l(:field_version) %>

+ <%= select_tag "version_id", content_tag('option', '') + + options_from_collection_for_select(versions, "id", "name"), {style: 'width:100px'} %> + <%= l(:attachment_type) %> + <%= select_tag "attachment_type", + options_from_collection_for_select(attachmenttypes, "id", + "typeName", 2), {style: 'width:100px'} %> +
-

<%= render :partial => 'attachments/form' %>

+ +

+ +

<%=l(:label_attachment_plural)%><%= render :partial => 'attachments/form' %>

<%= submit_tag l(:button_add) %> <% end %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 3d8a0e54..666b2874 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -143,7 +143,7 @@ zh: attachment_all: "全部" attachment_sufix_browse: "文件类型" attachment_browse: "内容类型" - attachment_type: '资源分类' + attachment_type: '分类' general_text_No: '否' general_text_Yes: '是' general_text_no: '否' diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 7b0a0099..d786101b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1319,7 +1319,7 @@ tr.entry td.filename_no_report { width: 70%; } tr.entry td.size { text-align: right; font-size: 90%; } tr.entry td.revision, tr.entry td.author { text-align: center; } tr.entry td.age { text-align: right; } -tr.entry.file td.filename a { margin-left: 16px; } +tr.entry.file td.filename a { margin-center: 16px; } tr.entry.file td.filename_no_report a { margin-left: 16px; } tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}