2.give a root controller in bid controller && give the administrator the root can change the reward who is deadine.exceptionHandle
parent
2fa6276829
commit
a50aff3fb4
@ -1,33 +1,41 @@
|
||||
<ul>
|
||||
<% if !@time_entry.nil? -%>
|
||||
<li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry},
|
||||
:class => 'icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% else %>
|
||||
<li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
|
||||
:class => 'icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% end %>
|
||||
<% if !@time_entry.nil? -%>
|
||||
<li>
|
||||
<%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry},
|
||||
:class => 'icon-edit', :disabled => !@can[:edit] %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
|
||||
:class => 'icon-edit', :disabled => !@can[:edit] %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
<%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
|
||||
<% if @activities.present? -%>
|
||||
<li class="folder">
|
||||
<a href="#" class="submenu"><%= l(:field_activity) %></a>
|
||||
<ul>
|
||||
<% @activities.each do |u| -%>
|
||||
<li><%= context_menu_link h(u.name), {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post,
|
||||
:selected => (@time_entry && u == @time_entry.activity), :disabled => !@can[:edit] %></li>
|
||||
<% end -%>
|
||||
<li><%= context_menu_link l(:label_none), {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => 'none'}, :back_url => @back}, :method => :post,
|
||||
:selected => (@time_entry && @time_entry.activity.nil?), :disabled => !@can[:edit] %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @activities.present? -%>
|
||||
<li class="folder">
|
||||
<a href="#" class="submenu"><%= l(:field_activity) %></a>
|
||||
<ul>
|
||||
<% @activities.each do |u| -%>
|
||||
<li>
|
||||
<%= context_menu_link h(u.name), {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post,
|
||||
:selected => (@time_entry && u == @time_entry.activity), :disabled => !@can[:edit] %>
|
||||
</li>
|
||||
<% end -%>
|
||||
<li>
|
||||
<%= context_menu_link l(:label_none), {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => 'none'}, :back_url => @back}, :method => :post,
|
||||
:selected => (@time_entry && @time_entry.activity.nil?), :disabled => !@can[:edit] %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
<%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
|
||||
<li>
|
||||
<%= context_menu_link l(:button_delete),
|
||||
{:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
|
||||
:method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon-del', :disabled => !@can[:delete] %>
|
||||
</li>
|
||||
<li>
|
||||
<%= context_menu_link l(:button_delete),
|
||||
{:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
|
||||
:method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon-del', :disabled => !@can[:delete] %>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -1,8 +1,8 @@
|
||||
$('#join').replaceWith('<%= escape_javascript join_in_course(course, user) %>');
|
||||
<% if @state %>
|
||||
<% if @state == 0 %>
|
||||
alert("加入成功")
|
||||
alert("加入成功")
|
||||
<% else %>
|
||||
alert("密码错误")
|
||||
alert("密码错误")
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
Loading…
Reference in new issue