组织页面也增加项目/课程快捷菜单

This commit is contained in:
ouyangxuhua 2016-01-07 16:37:41 +08:00
parent e763a7a8ca
commit 539d971901
3 changed files with 63 additions and 2 deletions

View File

@ -1,7 +1,20 @@
<% courses.each do |course|%>
<%# pro = Project.find course.course_id %>
<li class="homepageLeftMenuCoursesLine">
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
<%= link_to course.name, course_path(course.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => course.name%>
<div class="homepagePostSetting mt5 mr10">
<ul>
<li class="menuSetting">
<ul class="homepagePostSettiongText boxShadow">
<li><%= link_to "发布作业", homework_common_index_path(:course => course.id,:is_new => 1), :class => 'postOptionLink' %></li>
<li><%= link_to "发布通知", new_course_news_path(course), :class => 'postOptionLink' %></li>
<li><%= link_to "上传资源",upload_files_menu_path(:course_id => course.id), :remote => true, :class => 'postOptionLink' %></li>
<li><%= link_to "发布新帖",course_boards_path( course, :flag => true, :is_new => 1), :class => 'postOptionLink' %></li>
<li><a href="javascript:void(0);" class="postOptionLink">屏蔽动态</a></li>
</ul>
</li>
</ul>
</div>
</li>
<% end %>
<% if courses.size == 5%>

View File

@ -1,7 +1,19 @@
<% projects.each do |project|%>
<%# pro = Project.find project.project_id %>
<li class="homepageLeftMenuCoursesLine">
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%>
<div class="homepagePostSetting mt5 mr10">
<ul>
<li class="menuSetting">
<ul class="homepagePostSettiongText boxShadow">
<li><%=link_to "发布问题", new_project_issue_path(project), :class => 'postOptionLink', :target => '_blank' %></li>
<li><%=link_to "发布新帖",project_boards_path(project, :flag => true), :class => 'postOptionLink',:target => '_blank' %></li>
<li><%= link_to "上传资源",upload_files_menu_path(:project_id => project.id), :remote => true, :class => 'postOptionLink' %></li>
<li><a href="javascript:void(0);" class="postOptionLink">屏蔽动态</a></li>
</ul>
</li>
</ul>
</div>
</li>
<% end %>
<% if projects.size == 5%>

View File

@ -1,3 +1,39 @@
<script>
$(document).ready(function(){
$("#relateProject,.relatePInfo").mouseover(function(){
$(".relatePInfo").css("display","block");
})
$("#relateProject,.relatePInfo").mouseout(function(){
$(".relatePInfo").css("display","none");
})
$(".homepagePostPortrait").mouseover(function(){
$(this).children(".userCard").css("display","block");
})
$(".homepagePostPortrait").mouseout(function(){
$(this).children(".userCard").css("display","none");
})
$(".userCard").mouseover(function(){
$(this).css("display","block");
})
$(".userCard").mouseout(function(){
$(this).css("display","none");
})
$(".coursesLineGrey").mouseover(function(){
$(this).css("color","#ffffff");
})
$(".coursesLineGrey").mouseout(function(){
$(this).css("color","#808080");
})
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
$(this).prev().css("color","#ffffff");
$(this).css("z-index", "9999");
})
$(".homepagePostSetting").mouseout(function(){
$(this).prev().css("color","#808080");
$(this).css("z-index", "1");
})
})
</script>
<% org_activity_field = organization.org_subfields.where('field_type="default" and name="activity" and field_type="default"').first %>
<% org_course_field = organization.org_subfields.where('field_type="default" and name="course" and field_type="default"').first %>
<% org_project_field = organization.org_subfields.where('field_type="default" and name="project" and field_type="default"').first %>