diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 05b8d40d0..282df48c3 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -27,17 +27,17 @@ <% unless @entries.nil? %> ZIP下载 - <%# 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 %>
<%=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" %> diff --git a/app/views/users/_join_course_course_message.html.erb b/app/views/users/_join_course_course_message.html.erb index eacbfac8c..78a6f2ecd 100644 --- a/app/views/users/_join_course_course_message.html.erb +++ b/app/views/users/_join_course_course_message.html.erb @@ -5,7 +5,7 @@
  • - <% 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}" %> @@ -17,9 +17,10 @@ <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:

    真实姓名:<%= User.find(ma.course_message_id).realname %>

    -

    申请课程:<%= Course.find(ma.course_id).name%>

    -
    课程描述:
    -
    <%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %>

    申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "教辅"%>

    +

    申请班级:<%= Course.find(ma.course_id).name%>

    +
    班级描述:
    +
    <%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %>
    +

    申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%>

  • diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb index 7e4b28393..6f1b7db2f 100644 --- a/app/views/users/user_organizations.html.erb +++ b/app/views/users/user_organizations.html.erb @@ -3,7 +3,7 @@
    -
    s +
    组织列表 新建组织 <%#= 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 %>