实训base权限控制

This commit is contained in:
huang 2017-03-14 15:14:03 +08:00
parent 6d55409a85
commit a894e6c932
3 changed files with 19 additions and 15 deletions

View File

@ -2,7 +2,7 @@
<%= import_ke(enable_at: true,init_activity: true) %>
<% end %>
<div class="task-pm-content">
<div class="task-pm-box mt20">
<div class="panel-header ">
<h3>简介</h3>
@ -86,7 +86,7 @@
</div>
</div>
</div>
</div>
<% if false %>
<%= content_for(:header_tags) do %>

View File

@ -21,7 +21,10 @@
<%= render :partial => 'shixuns/shixun_top' %>
<%= render_flash_messages %>
<%= yield %>
<div class="task-pm-content">
<%= yield %>
</div>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
@ -36,9 +39,6 @@
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
<%#=render :partial => 'layouts/upload_avatar', :locals => {:source => @project} %>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
<!-- MathJax的配置 -->

View File

@ -11,14 +11,18 @@
<div class="task-header-nav">
<ul class="task-header-navs clearfix">
<li><a href="<%= shixun_challenges_url(@shixun) %>" class="active">实训</a></li>
<li>
<%= link_to l(:project_module_repository),
({:controller => 'repositories',
:action => 'shixun_show',
:id => @shixun,
:repository_id => shixun_repository(@shixun).try(:identifier)})
%>
</li>
<li><a href="<%= settings_shixun_path(@shixun) %>">配置</a></li>
<% unless @shixun.repository.nil? %>
<li>
<%= link_to l(:project_module_repository),
({:controller => 'repositories',
:action => 'shixun_show',
:id => @shixun,
:repository_id => shixun_repository(@shixun).try(:identifier)})
%>
</li>
<% end %>
<% if User.current.manager_of_shixun?(@shixun) %>
<li><a href="<%= settings_shixun_path(@shixun) %>">配置</a></li>
<% end %>
</ul>
</div>