diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 200810c4b..2f7d6e600 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -114,22 +114,12 @@ class IssuesController < ApplicationController @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } @allowed_statuses = @issue.new_statuses_allowed_to(User.current) - # @edit_allowed = User.current.allowed_to?(:edit_issues, @project) - if User.current.admin? || User.current.id == @issue.author_id || User.current.id == @issue.assigned_to_id || ProjectInfo.manager?(User.current.id, @project) - @edit_allowed = true - # elsif User.current.id == @issue.author.id - else - @edit_allowed = false - end - # @edit_allowed = User.current.allowed_to?(:edit_issues, @project) + @edit_allowed = User.current.allowed_to?(:edit_issues, @project) @priorities = IssuePriority.active @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 diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index b93222436..4c379ae54 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %>
- <% if @edit_allowed && !@allowed_statuses.empty? %> + <% if @edit_allowed || !@allowed_statuses.empty? %>
<%= l(:label_change_properties) %>
<%= render :partial => 'form', :locals => {:f => f} %> diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb index 896b6a2c8..1cec18b37 100644 --- a/app/views/tags/_tag.html.erb +++ b/app/views/tags/_tag.html.erb @@ -23,7 +23,7 @@ <%= form_for "tag_for_save",:remote=>true,:url=>tag_path, :update => "tags_show", :complete => '$("#put-tag-form-issue").hide();' do |f| %> - <%= f.text_field :name ,:id => "name-issue",:size=>"30",:require=>true,:maxlength => 25,:minlength=>1 %> + <%= f.text_field :name ,:id => "name-issue",:size=>"30",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>1 %> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.submit l(:button_project_tags_add),:class => "small"%> diff --git a/app/views/users/tag_save.js.erb b/app/views/users/tag_save.js.erb index 7e1a5938d..c406f32df 100644 --- a/app/views/users/tag_save.js.erb +++ b/app/views/users/tag_save.js.erb @@ -2,7 +2,7 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); -$('#put-tag-form-issue').hide(); +//$('#put-tag-form-issue').hide(); $('#name-issue').val(""); <% elsif @obj_flag == '6'%> $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); @@ -15,6 +15,6 @@ $('#name-issue').val(""); $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); $('#put-tag-form #name').val(""); -$('#put-tag-form').hide(); +//$('#put-tag-form').hide(); <% end %> diff --git a/config/settings.yml b/config/settings.yml index d43d3699b..fbaba502f 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -232,7 +232,7 @@ tags_min_length: default: 1 tags_max_length: format: int - default: 13 + default: 30 tags_show_search_results: format: int default: 5