申请加入班级,将课程改为班级

This commit is contained in:
daiao 2016-12-02 19:14:09 +08:00
parent 6fc4c5d138
commit 585d1ebb0d
3 changed files with 16 additions and 15 deletions

View File

@ -27,17 +27,17 @@
<!--quality_analysis-->
<% unless @entries.nil? %>
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
<%# if User.current.member_of?(@project) && @project.is_public? %>
<%# if quality_analysis(User.current.try(:login), @repository.id).nil? %>
<%#= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
<%# else %>
<%#= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
<%# end %>
<%# end %>
<% if User.current.member_of?(@project) && @project.is_public? %>
<% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
<% else %>
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
<% end %>
<% end %>
<% end %>
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
<% end %>
<%# unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
<%#= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
<%# end %>
<div class="fl mt5 ml15">
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>

View File

@ -5,7 +5,7 @@
</li>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<a href="javascript:void(0);" class="newsGrey">
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
@ -17,9 +17,10 @@
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
</p>
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
<div class="fl">课程描述:</div>
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div> <p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "教辅"%></p>
<p>申请班级:<%= Course.find(ma.course_id).name%></p>
<div class="fl">班级描述:</div>
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div>
<p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%></p>
</div>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
<span id="deal_info_<%=ma.id%>">

View File

@ -3,7 +3,7 @@
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="postContainer mb10">
<div class="postBanner" style="padding-bottom:5px;">s
<div class="postBanner" style="padding-bottom:5px;">
<span class="linkGrey2 f16">组织列表</span>
<a href="<%= new_organization_path %>" class="sy_btn_green fr" style="margin-top: -5px">新建组织</a>
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>