Merged r2610, r2611 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2654 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-04-05 12:16:34 +00:00
parent e28b5e1f08
commit 16810acf01
7 changed files with 15 additions and 1 deletions

View File

@ -46,6 +46,7 @@ class CustomFieldsController < ApplicationController
end end
if request.post? and @custom_field.save if request.post? and @custom_field.save
flash[:notice] = l(:notice_successful_create) flash[:notice] = l(:notice_successful_create)
call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
redirect_to :action => 'list', :tab => @custom_field.class.name redirect_to :action => 'list', :tab => @custom_field.class.name
end end
@trackers = Tracker.find(:all, :order => 'position') @trackers = Tracker.find(:all, :order => 'position')
@ -58,6 +59,7 @@ class CustomFieldsController < ApplicationController
@custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : [] @custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
end end
flash[:notice] = l(:notice_successful_update) flash[:notice] = l(:notice_successful_update)
call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
redirect_to :action => 'list', :tab => @custom_field.class.name redirect_to :action => 'list', :tab => @custom_field.class.name
end end
@trackers = Tracker.find(:all, :order => 'position') @trackers = Tracker.find(:all, :order => 'position')

View File

@ -82,6 +82,7 @@ function deleteValueField(e) {
<% end %> <% end %>
</p> </p>
<p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p> <p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p>
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
</div> </div>
<div class="box"> <div class="box">
@ -109,5 +110,6 @@ when "IssueCustomField" %>
<p><%= f.check_box :is_required %></p> <p><%= f.check_box :is_required %></p>
<% end %> <% end %>
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
</div> </div>
<%= javascript_tag "toggle_custom_field_format();" %> <%= javascript_tag "toggle_custom_field_format();" %>

View File

@ -11,5 +11,7 @@
<p><label for="issue_status_is_default"><%=l(:field_is_default)%></label> <p><label for="issue_status_is_default"><%=l(:field_is_default)%></label>
<%= check_box 'issue_status', 'is_default' %></p> <%= check_box 'issue_status', 'is_default' %></p>
<%= call_hook(:view_issue_statuses_form, :issue_status => @issue_status) %>
<!--[eoform:issue_status]--> <!--[eoform:issue_status]-->
</div> </div>

View File

@ -1,4 +1,6 @@
<ul> <ul>
<%= call_hook(:view_issues_context_menu_start, {:issues => @issues, :can => @can, :back => @back }) %>
<% if !@issue.nil? -%> <% if !@issue.nil? -%>
<li><%= context_menu_link l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, <li><%= context_menu_link l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue},
:class => 'icon-edit', :disabled => !@can[:edit] %></li> :class => 'icon-edit', :disabled => !@can[:edit] %></li>
@ -87,4 +89,6 @@
:class => 'icon-move', :disabled => !@can[:move] %></li> :class => 'icon-move', :disabled => !@can[:move] %></li>
<li><%= context_menu_link l(:button_delete), {:controller => 'issues', :action => 'destroy', :ids => @issues.collect(&:id)}, <li><%= context_menu_link l(:button_delete), {:controller => 'issues', :action => 'destroy', :ids => @issues.collect(&:id)},
:method => :post, :confirm => l(:text_issues_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %></li> :method => :post, :confirm => l(:text_issues_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %></li>
<%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
</ul> </ul>

View File

@ -69,6 +69,8 @@ end %>
<%= link_to_attachments @issue %> <%= link_to_attachments @issue %>
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %> <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
<hr /> <hr />
<div id="relations"> <div id="relations">

View File

@ -15,6 +15,7 @@
<p><%= f.text_field :lastname, :required => true %></p> <p><%= f.text_field :lastname, :required => true %></p>
<p><%= f.text_field :mail, :required => true %></p> <p><%= f.text_field :mail, :required => true %></p>
<p><%= f.select :language, lang_options_for_select %></p> <p><%= f.select :language, lang_options_for_select %></p>
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
</div> </div>
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>

View File

@ -13,6 +13,7 @@
<% end %> <% end %>
<p><%= f.check_box :admin, :disabled => (@user == User.current) %></p> <p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>
<%= call_hook(:view_users_form, :user => @user, :form => f) %>
</div> </div>
<div class="box"> <div class="box">