修改问题权限,问题界面用户图像显示错误,个人配置信息按钮跳转
This commit is contained in:
parent
470eff9b88
commit
2fbf8e1901
|
@ -103,6 +103,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
|
||||
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all
|
||||
@journals.each_with_index {|j,i| j.indice = i+1}
|
||||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
||||
|
@ -118,6 +119,10 @@ class IssuesController < ApplicationController
|
|||
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
||||
|
||||
@project_base_tag = (params[:project_id] || @issue.project)?'base_projects':'base'#by young
|
||||
#by huang
|
||||
# @change_flag = (@issue.author == User.current) || (User.current.admin?)
|
||||
|
||||
#end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
retrieve_previous_and_next_issue_ids
|
||||
|
|
|
@ -62,8 +62,7 @@ class MyController < ApplicationController
|
|||
set_language_if_valid @user.language
|
||||
@user.update_user_extensions()
|
||||
flash[:notice] = l(:notice_account_updated)
|
||||
|
||||
redirect_to my_account_path
|
||||
redirect_to user_path(@user) #modified by huang/ my_account_path
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
<div class="contextual">
|
||||
<!--added by huang-->
|
||||
|
||||
<% if (@issue.author == User.current) || (User.current.admin?) %>
|
||||
|
||||
<!--end-->
|
||||
<%= link_to l(:button_update), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
|
||||
<%= 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) %>
|
||||
|
|
|
@ -49,8 +49,10 @@
|
|||
|
||||
unless @issue.disabled_core_fields.include?('assigned_to_id')
|
||||
#modified by nie
|
||||
rows.left l(:field_assigned_to), (image_tag url_to_avatar(@issue.author), :class => 'avatar').to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
|
||||
#modified by huang
|
||||
rows.left l(:field_assigned_to), (image_tag url_to_avatar(@issue.assigned_to(@user)), :class => 'avatar').to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
|
||||
end
|
||||
# end huang
|
||||
unless @issue.disabled_core_fields.include?('category_id')
|
||||
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category'
|
||||
end
|
||||
|
|
|
@ -14,12 +14,10 @@
|
|||
</legend>
|
||||
<div>
|
||||
<!--upload profiles-->
|
||||
<%= render :partial=> "avatar/avatar_form", :locals=>{source:@user} %>
|
||||
<!--upload-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<%= labelled_form_for :user, @user,
|
||||
:url => { :action => "account" },
|
||||
:url => {:action => "account" },
|
||||
:html => { :id => 'my_account_form',
|
||||
:method => :post } do |f| %>
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
|
@ -32,7 +30,6 @@
|
|||
</p>
|
||||
<p style="width:400px;padding-left: 26px;">
|
||||
<%= f.text_field :lastname, :required => true %>
|
||||
</p>
|
||||
|
||||
<p style="width:357px;padding-left: 26px;">
|
||||
<%= f.text_field :mail, :required => true %>
|
||||
|
@ -72,6 +69,7 @@
|
|||
<%= render :partial => 'users/preferences' %></div>
|
||||
</fieldset>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% html_title(l(:label_my_account)) -%>
|
||||
<% html_title(l(:label_my_account)) %>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 859 KiB After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue