Skip to content

Commit

Permalink
Rename rhtml to html.erb. Now preview is available.
Browse files Browse the repository at this point in the history
(IssueID: #1077)

Signed-off-by: Akiko Takano <akiko.pusu@gmail.com>
  • Loading branch information
akiko-pusu committed Jul 4, 2012
1 parent f7bbd2a commit 3ddbcb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions app/views/settings/_redmine_banner.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) %>

</p>
<p>
<%=content_tag(:label, l(:label_banner_message)) %>
<%=text_area_tag 'settings[banner_description]', @settings['banner_description'], :size =>"40x3",
:class => 'wiki-edit' ,:required => true %><br/>
:class => 'wiki-edit' ,:required => true %><br/>
</p>
<%= wikitoolbar_for "settings_banner_description" %>
<%= link_to_remote l(:label_preview),
{ :url => { :controller => 'banner', :action => 'preview'},
Expand All @@ -39,8 +40,8 @@
:with => "Form.serialize('plugin')",
:complete => "Element.scrollTo('banner_description_preview')"
}, :accesskey => accesskey(:preview) %>

<div id="banner_description_preview" class="wiki"></div>

<p>
<%=content_tag(:label, l(:label_use_timer))%>
<span class="use_timer">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h2><%= l(:label_settings) %>: <%=h @plugin.name %></h2>

<div id="settings">
<% form_tag({:action => 'plugin'},{:id => :plugin }) do %>
<%= form_tag({:action => 'plugin'},{:id => :plugin }) do %>
<div class="box tabular">
<%= render :partial => @partial, :locals => {:settings => @settings}%>
</div>
Expand Down
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3ddbcb2

Please sign in to comment.