修改编辑竞赛通知bug

This commit is contained in:
wanglinchun 2014-06-09 17:32:18 +08:00
parent c7cecdecea
commit a5b6883994
1 changed files with 4 additions and 6 deletions

View File

@ -1,23 +1,21 @@
<div class="contextual"> <div class="contextual">
<%#= watcher_link(@contestnotification, User.current) %>
<%= link_to(l(:button_edit), <%= link_to(l(:button_edit),
edit_contest_contestnotification_path(@contestnotification), edit_contest_contestnotification_path(@contest, @contestnotification),
:class => 'icon icon-edit', :class => 'icon icon-edit',
:accesskey => accesskey(:edit), :accesskey => accesskey(:edit),
:onclick => '$("#edit-contestnotifications").show(); return false;') if User.current%> :onclick => '$("#edit-contestnotifications").show(); return true;') if User.current %>
<%= delete_link contest_contestnotification_path(@contest, @contestnotification) if User.current%> <%= delete_link contest_contestnotification_path(@contest, @contestnotification) if User.current %>
</div> </div>
<h3><strong><%=h @contestnotification.title %></strong></h3> <h3><strong><%=h @contestnotification.title %></strong></h3>
<% if authorize_for_contest('contestnotifications', 'edit') %> <% if authorize_for_contest('contestnotifications', 'edit') %>
<div id="edit-contestnotifications" style="display:none;"> <div id="edit-contestnotifications" style="display:none;">
<%= labelled_form_for :contestnotifications, @contestnotification, :url => contest_contestnotification_path(@contestnotification), <%= labelled_form_for :contestnotifications, @contestnotifications, :url => contest_contestnotification_path(@contestnotifications),
:html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %> :html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %> <%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>
<%= preview_link preview_contestnotifications_path(:contest_id => @contest, :id => @contestnotification), 'contestnotifications-form',target='preview',{:class => ''} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-contestnotifications").hide(); return false;' %> <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-contestnotifications").hide(); return false;' %>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>