项目成员列表,fork列表,关注列表样式调整。并修改小铃铛消息的班级加入的申请文字

This commit is contained in:
daiao 2016-12-01 15:44:15 +08:00
parent eeb57401d9
commit c745f69e95
5 changed files with 16 additions and 9 deletions

View File

@ -543,12 +543,12 @@ class ProjectsController < ApplicationController
@users -= watched.watcher_users if @watched @users -= watched.watcher_users if @watched
end end
@watchers = @project.watcher_users @watchers = @project.watcher_users
@limit = 20 @limit = 32
@is_remote = true @is_remote = true
@watchers_count = @watchers.count @watchers_count = @watchers.count
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1 @watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
@offset ||= @watcher_pages.offset @offset ||= @watcher_pages.offset
@watchers = paginateHelper @watchers, 20 @watchers = paginateHelper @watchers, @limit
end end
end end
@ -611,14 +611,14 @@ class ProjectsController < ApplicationController
@applied_members = appied_project_members(@project, @members) @applied_members = appied_project_members(@project, @members)
end end
end end
@members = paginateHelper @members @members = paginateHelper @members, 32
end end
def member_forked def member_forked
@forked_projects = Project.where(:forked_from_project_id => @project.id) @forked_projects = Project.where(:forked_from_project_id => @project.id)
@limit = 20 @limit = 32
@is_remote = true @is_remote = true
@forked_count = @forked_projects.count @forked_count = @forked_projects.count
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1 @forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="clear"> <div class="clear">
<div> <div>
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" style="margin-left: 0px">
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);"> <li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %> <%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
</li> </li>

View File

@ -1,3 +1,4 @@
<% if @forked_count > 0 %>
<div class="pro_new_info mb10"> <div class="pro_new_info mb10">
<h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2> <h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
<ul class="clear pro_new_users_box"> <ul class="clear pro_new_users_box">
@ -24,4 +25,6 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %>
<%= render :partial => "projects/no_data" %>
<% end %>

View File

@ -1,3 +1,4 @@
<% if @watchers.count > 0 %>
<div class="pro_new_info mb10"> <div class="pro_new_info mb10">
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2> <h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
<ul class="clear pro_new_users_box"> <ul class="clear pro_new_users_box">
@ -24,6 +25,9 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %>
<%= render :partial => "projects/no_data" %>
<% end %>

View File

@ -1,11 +1,11 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">系统提示</span> <span class="newsBlue homepageNewsPublisher">系统提示</span>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的班级成员申请:</span>
</li> </li>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl"> <li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<a href="javascript:void(0);" class="newsGrey"> <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), <%= 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}" %> :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
<!--:onmouseover => "message_titile_show($(this),event)",--> <!--:onmouseover => "message_titile_show($(this),event)",-->
@ -14,7 +14,7 @@
</li> </li>
<div style="display: none" class="message_title_red system_message_style"> <div style="display: none" class="message_title_red system_message_style">
<p> <p>
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下: <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
</p> </p>
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p> <p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
<p>申请课程:<%= Course.find(ma.course_id).name%></p> <p>申请课程:<%= Course.find(ma.course_id).name%></p>