This commit is contained in:
z9hang 2014-07-05 11:44:21 +08:00
commit 5c93442c79
6 changed files with 15 additions and 14 deletions

View File

@ -25,7 +25,7 @@ class AvatarController < ApplicationController
end
end
end
if @temp_file && (@temp_file.size > 0)
if @temp_file && (@temp_file.size > 0)
diskfile=disk_filename(@source_type,@source_id)
@urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file))
logger.info("Saving avatar '#{diskfile}' (#{@temp_file.size} bytes)")
@ -55,7 +55,7 @@ class AvatarController < ApplicationController
# saved = @avatar.save
begin
f = Magick::ImageList.new(diskfile)
width = 300.0;
width = 300.0
proportion = (width/f[0].columns)
height = (f[0].rows*proportion)
f.resize_to_fill!(width,height)

View File

@ -42,17 +42,17 @@
<div id="upload_progressbar" style="height:14px; margin-bottom: 10px;display: block"></div>
</div>
</span>
<a href="javascript:void(0);" class="btn_addPic" style="text-decoration:none;">
<span><%= l(:button_upload_photo) %></span>
<a href="javascript:void(0);" class="btn_addPic" style="text-decoration:none;">
<span><%= l(:button_upload_photo) %></span>
</a>
<span class="add_avatar" style="margin-left: -55px;width: 70px">
<span class="add_avatar" style="margin-left: -55px;width: 70px">
<%= file_field_tag 'avatar[image]',
:id => nil,
:class => 'file_selector',
:style => 'width:70px;',#added by young
:size => "1",
:multiple => false,
:onchange => 'addInputAvatar(this);',
:onchange => 'addInputAvatar(this);',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
@ -61,7 +61,7 @@
:description_placeholder => nil ,# l(:label_optional_description)
:source_type => source.class.to_s,
:source_id => source.id.to_s
} %>
} %>
</span>
</div>
<% content_for :header_tags do %>

View File

@ -44,7 +44,7 @@
</td>
<% if e.event_type == "issue" %>
<td align="right">
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
<span> <%= link_to l(:label_find_all_comments), issue_path(e.id) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
</td>
<% end %>
</tr>

View File

@ -14,5 +14,5 @@
<%= watcher_link(@issue, User.current) %>
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
</div>

View File

@ -28,11 +28,12 @@
<ul class="issue_list">
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<ul class="list-group-item-meta">
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span><%= l(:label_post_on)%> <% a = [] %>
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span>
<%= l(:label_post_on)%> <% a = [] %>
<% a << column_content[1] %>
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
<%= link_to a.join(' '), issue_path(issue), :class => "issue-link" %>
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
</ul>
<% end -%>
<ul class="list-group-item-meta">
@ -46,7 +47,7 @@
<% end %>
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
<div class="find-comment-class">
<span><%= link_to l(:label_find_all_comments), issue_path(issue) %></span><%= l(:label_comments_count, :count => issue.journals.all.count) %>
<span><%= link_to l(:label_find_all_comments), issue_path(issue.id) %></span><%= l(:label_comments_count, :count => issue.journals.all.count) %>
</div>
</ul>
</ul>

View File

@ -12,12 +12,12 @@
<tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
<%= link_to issue.id, issue_path(issue) %>
<%= link_to issue.id, issue_path(issue.id) %>
</td>
<td class="project"><%= link_to_project(issue.project) %></td>
<td class="tracker"><%=h issue.tracker %></td>
<td class="subject">
<%= link_to truncate(issue.subject, :length => 60), issue_path(issue) %> (<%=h issue.status %>)
<%= link_to truncate(issue.subject, :length => 60), issue_path(issue.id) %> (<%=h issue.status %>)
</td>
</tr>
<% end %>