From 0ea683e1b497f88a004d588cf5119a15cde3841e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 07:45:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue=E4=B8=AD=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=99=84=E4=BB=B6=E7=9A=84=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 14 ++++++++++++++ app/views/attachments/_project_file_links.html.erb | 6 ++---- app/views/issues/_edit.html.erb | 4 ++-- app/views/issues/_history.html.erb | 2 +- app/views/issues/show.html.erb | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dc52de3e3..599f27215 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -325,6 +325,20 @@ module ApplicationHelper :title => attachment.filename end + def thumbnail_issue_tag(attachment) + imagesize = attachment.thumbnail(:size => "50*50") + imagepath = named_attachment_path(attachment, attachment.filename) + if imagesize + link_to image_tag(imagesize), + imagepath, + :title => attachment.filename + else + link_to image_tag(imagepath , height: '73', width: '100'), + imagepath, + :title => attachment.filename + end + end + # 图片缩略图链接 def thumbnail_small_tag(attachment) imagesize = attachment.thumbnail(:size => "200*200") diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index d32025787..7a9d1a6ca 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -5,7 +5,7 @@ <%if is_float%>
<% end%> - + <% if options[:length] %> <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%> <% else %> @@ -62,11 +62,9 @@ <% if defined?(thumbnails) && thumbnails %> <% images = attachments.select(&:thumbnailable?) %> <% if images.any? %> -
<% images.each do |attachment| %> -
<%= thumbnail_tag(attachment) %>
+
<%= thumbnail_issue_tag(attachment) %>
<% end %> -
<% end %> <% end %>
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index fa3153012..1266f4611 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -18,7 +18,7 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <% end %> -
说明 +
回复 <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
@@ -29,7 +29,7 @@ - +
diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 50ddbceee..8239517c0 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -13,7 +13,7 @@ <% if journal.details.any? %> <% details_to_strings(journal.details).each do |string| %> <%= string %> - <% end %> + <% end %> <% end %>

diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index a42562c06..d68e1fc7d 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -115,7 +115,7 @@ <% end %> -
+

<%= l(:button_submit) %> From fbcd9f9a96081e1bad159221e3ab940000c7d809 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 08:28:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?wiki=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attachments/_project_file_links.html.erb | 2 +- app/views/wiki/show.html.erb | 2 +- public/stylesheets/project.css | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 7a9d1a6ca..97cbefce9 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index a23aa6c04..28fab1243 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -45,7 +45,7 @@ <% end %>
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %> -<%= link_to_attachment_project @page, :author => false %> +<%= link_to_attachment_project @page, :author => true %> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index c6b58b8f3..e3b124474 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -466,6 +466,21 @@ img.ui-datepicker-trigger { .wiki_con_box{ line-height:1.9; color:#2d2d2d;} .wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;} #wiki_new_box{ display:none;} +/*wiki显示附加*/ +.wiki-page { + font-size: 14px; + color: #09658C !important; + font-weight: bold; + width: 630px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin-bottom: 10px; +} +/*.author{*/ + /*color: #FF5722;*/ + /*margin-left:20px;*/ +/*}*/ /*里程碑进度条*/ table.progress { @@ -501,3 +516,4 @@ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px p.other-formats { text-align: right; font-size:0.9em; color: #666; } .other-formats span + span:before { content: "| "; } + From fec0a7472dd889dd4ab916972ec5910313166ea0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 08:43:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E9=97=BB=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_project_news.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 54f6dc70b..75b51ab6c 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -29,7 +29,7 @@ <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= l(:label_add_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
-

<%= news.description %>

+

<%= news.description %>

<%= l(:label_create_time) %> :<%= format_time(news.created_on) %>