Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
huang 2015-04-17 08:44:16 +08:00
commit 258a023abd
7 changed files with 38 additions and 10 deletions

View File

@ -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")

View File

@ -5,7 +5,7 @@
<%if is_float%>
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
<% end%>
<span title="<%= attachment.filename%>" id = "attachment_">
<span title="<%= attachment.filename %>" id = "attachment_">
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %>
@ -53,7 +53,7 @@
<% end %>
<% if options[:author] %>
<span class="author" title="<%= attachment.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) %>
</span>
<% end %>
@ -62,11 +62,9 @@
<% if defined?(thumbnails) && thumbnails %>
<% images = attachments.select(&:thumbnailable?) %>
<% if images.any? %>
<div class="thumbnails">
<% images.each do |attachment| %>
<div><%= thumbnail_tag(attachment) %></div>
<div class="pro_pic fl " width="100" height="73"><%= thumbnail_issue_tag(attachment) %></div>
<% end %>
</div>
<% end %>
<% end %>
</div>

View File

@ -18,7 +18,7 @@
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
</div>
<% end %>
<fieldset><legend>说明</legend>
<fieldset><legend>回复</legend>
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
</fieldset>
<!--<%# if @issue.safe_attribute? 'private_notes' %>-->
@ -29,7 +29,7 @@
<!--</fieldset>-->
<!--<fieldset><legend><%#= l(:label_attachment_plural) %></legend>-->
<!--<p style="padding-top: 5px;"><%= render :partial => 'attachments/new_form', :locals => {:container => @issue} %>-->
<!--<p style="padding-top: 5px;"><%#= render :partial => 'attachments/new_form', :locals => {:container => @issue} %>
<!--</fieldset>-->
<div class="cl"></div>

View File

@ -13,7 +13,7 @@
<% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %>
<%= string %>
<% end %> </span>
<% end %>
<% end %>
</p>
</div>

View File

@ -115,7 +115,7 @@
</div>
<% end %>
<!--留言-->
<br>
<p style="padding-top: 5px"></p>
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="$('#issue-form').submit();">
<%= l(:button_submit) %>
</a>

View File

@ -45,7 +45,7 @@
<% end %>
<div class="cl"></div>
<%= render(:partial => "wiki/content", :locals => {:content => @content}) %>
<%= link_to_attachment_project @page, :author => false %>
<%= link_to_attachment_project @page, :author => true %>
<!--<a href="javascript:void(0)" class=" c_orange fl ml20 fl">zhang<span class="c_grey"> 2014-08-04 10:09</span></a>-->
</div>
<!--wiki new-->

View File

@ -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: "| "; }