From 3ddbcb270eeba151c2caf7749ec196f20245ef79 Mon Sep 17 00:00:00 2001 From: Akiko Takano Date: Thu, 5 Jul 2012 05:49:29 +0900 Subject: [PATCH] Rename rhtml to html.erb. Now preview is available. (IssueID: #1077) Signed-off-by: Akiko Takano --- app/views/settings/_redmine_banner.html.erb | 7 ++++--- app/views/settings/{plugin.rhtml => plugin.html.erb} | 2 +- config/routes.rb | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) rename app/views/settings/{plugin.rhtml => plugin.html.erb} (79%) diff --git a/app/views/settings/_redmine_banner.html.erb b/app/views/settings/_redmine_banner.html.erb index 39e1325..3616723 100644 --- a/app/views/settings/_redmine_banner.html.erb +++ b/app/views/settings/_redmine_banner.html.erb @@ -25,11 +25,12 @@ <%=content_tag(:label, l(:setting_banner_display_part))%> <%= select_tag('settings[display_part]', options_for_select([[l(:label_header_only),'header'],[l(:label_footer_only),'footer'],[l(:label_both),'both']],@settings['display_part'])) %> - +

<%=content_tag(:label, l(:label_banner_message)) %> <%=text_area_tag 'settings[banner_description]', @settings['banner_description'], :size =>"40x3", - :class => 'wiki-edit' ,:required => true %>
+ :class => 'wiki-edit' ,:required => true %>
+

<%= wikitoolbar_for "settings_banner_description" %> <%= link_to_remote l(:label_preview), { :url => { :controller => 'banner', :action => 'preview'}, @@ -39,8 +40,8 @@ :with => "Form.serialize('plugin')", :complete => "Element.scrollTo('banner_description_preview')" }, :accesskey => accesskey(:preview) %> + -

<%=content_tag(:label, l(:label_use_timer))%> diff --git a/app/views/settings/plugin.rhtml b/app/views/settings/plugin.html.erb similarity index 79% rename from app/views/settings/plugin.rhtml rename to app/views/settings/plugin.html.erb index 4a2d805..5645948 100644 --- a/app/views/settings/plugin.rhtml +++ b/app/views/settings/plugin.html.erb @@ -1,7 +1,7 @@

<%= l(:label_settings) %>: <%=h @plugin.name %>

-<% form_tag({:action => 'plugin'},{:id => :plugin }) do %> +<%= form_tag({:action => 'plugin'},{:id => :plugin }) do %>
<%= render :partial => @partial, :locals => {:settings => @settings}%>
diff --git a/config/routes.rb b/config/routes.rb index 96d5d69..8f38be4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,7 @@ Rails.application.routes.draw do match 'projects/:project_id/banner/:action', :to => 'banner' match 'projects/:project_id/banner/project_banner_off', :to => 'banner#project_banner_off' - match 'banner/preview', :to => 'banner#preview' + match 'banner/preview', :to => 'banner#preview',:via => [:get, :post] match 'banner/off', :to => 'banner#off' + match 'projects/:project_id/banner/preview', :to => 'banner#preview', :via => [:get, :post] end \ No newline at end of file