去除掉部分无用预览按钮
This commit is contained in:
parent
395ae35a0e
commit
7a710a4a8f
|
@ -17,7 +17,7 @@
|
|||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%#= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
||||
|
|
||||
<%#= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
|
||||
<%= textilizable @text, :attachments => @attachments, :object => @previewed %>
|
||||
<%= textilizable @text, :attachments => @attachments, :object => @previewed %>
|
||||
</fieldset>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_contestnotifications_path(id: @contestnotification),
|
||||
<%#= preview_link preview_contestnotifications_path(id: @contestnotification),
|
||||
'contestnotifications-form'
|
||||
%>
|
||||
<% end %>
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>|
|
||||
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
|
||||
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
|
||||
<% end if @course %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
|
||||
<%#= submit_tag l(:button_save) %>
|
||||
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
|
||||
<%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
|
||||
<%#= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -84,8 +84,8 @@
|
|||
<%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit -->
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
|
||||
|
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
|
||||
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
|
||||
<% end if @project %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%#= submit_tag l(:button_save) %>
|
||||
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
|
||||
<%#= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<%= labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
|
||||
<%#= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<% end %>
|
||||
<% elsif @course %>
|
||||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<%#= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
|
||||
<p><%= submit_tag l(:button_save) %>
|
||||
<%= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
|
||||
<%#= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
|
||||
<%= wikitoolbar_for 'content_text' %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -100,7 +100,6 @@ RedmineApp::Application.routes.draw do
|
|||
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
|
||||
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
|
||||
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete
|
||||
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
||||
## new added by linchun #新竞赛相关
|
||||
resources :contests, only: [:index] do
|
||||
resources :contestnotifications do
|
||||
|
@ -136,6 +135,19 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
match '/news/preview', :to => 'previews#news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
||||
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
||||
|
||||
#resource :previews, only: [] do
|
||||
# collection do
|
||||
# match 'news', :via => [:get, :post, :put]
|
||||
# match 'issue', :via => [:get, :post, :put]
|
||||
# end
|
||||
#end
|
||||
|
||||
resources :stores do
|
||||
collection do
|
||||
match 'search', :via => [:get, :post]
|
||||
|
@ -188,11 +200,6 @@ RedmineApp::Application.routes.draw do
|
|||
match 'account/activate', :via => :get
|
||||
match 'account/valid_ajax', :via => :get
|
||||
|
||||
match '/news/preview', :to => 'previews#news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
||||
|
||||
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
|
|
Loading…
Reference in New Issue