|
|
|
@ -13,13 +13,13 @@
|
|
|
|
|
<div class="top_new">
|
|
|
|
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
|
|
|
|
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
|
|
|
|
<a href="<%= url_for(:controller => 'projects', :action => 'new',:host=>Setting.host_name) %>" class="bgreen_n_btn fr ml10 mt2">新建项目</a>
|
|
|
|
|
<a href="<%= url_for(:controller => 'projects', :action => 'new',:host=>Setting.host_name) %>" class="bgreen_n_btn fr ml10 mt2" target="_blank">新建项目</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a href="<%= join_project_projects_path %>" data-remote ="true" class="green_n_btn fr mt2">加入项目</a>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
|
|
|
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',:host=>Setting.host_course) %>" class="green_n_btn fr mt2">新建课程</a>
|
|
|
|
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',:host=>Setting.host_course) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<!--<a href="<%#= url_for(:controller => 'courses', :action => 'join_private_courses',:host=>Setting.host_course) %>" data-remote ="true" class="green_n_btn fr mt2">加入课程</a>-->
|
|
|
|
|
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class="green_n_btn fr mt2">加入课程</a>
|
|
|
|
@ -55,7 +55,7 @@
|
|
|
|
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courses')%>" class="f14 fb fl c_dark ml10 mt8"><%= @center_flag ? '我的课程' : 'TA的课程' %></a>
|
|
|
|
|
<% if @center_flag %>
|
|
|
|
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
|
|
|
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',:host=>Setting.host_course) %>" class=" green_u_btn fr mt8 mr8">新建课程</a>
|
|
|
|
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',:host=>Setting.host_course) %>" class=" green_u_btn fr mt8 mr8" target="_blank">新建课程</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class=" green_u_btn fr mt8 mr8">加入课程</a>
|
|
|
|
|
<% end %>
|
|
|
|
@ -85,7 +85,7 @@
|
|
|
|
|
<a href="<%=url_for(:controller => 'users', :action => 'user_projects')%>" class="f14 fb fl c_dark ml10 mt8"><%= @center_flag ? '我的项目' : 'TA的项目' %></a>
|
|
|
|
|
<% if @center_flag %>
|
|
|
|
|
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
|
|
|
|
<a href="<%= url_for(:controller => 'projects', :action => 'new',:host=>Setting.host_name) %>" class=" green_u_btn fr mt8 mr8">新建项目</a>
|
|
|
|
|
<a href="<%= url_for(:controller => 'projects', :action => 'new',:host=>Setting.host_name) %>" class=" green_u_btn fr mt8 mr8" target="_blank">新建项目</a>
|
|
|
|
|
<% else %>
|
|
|
|
|
<a href="<%= join_project_projects_path %>" data-remote ="true" class=" green_u_btn fr mt8 mr8">加入项目</a>
|
|
|
|
|
<% end %>
|
|
|
|
|