1.配置栏目列表,增加类型一列;

2.暂时隐藏类型为“资源”的栏目的链接
This commit is contained in:
ouyangxuhua 2015-12-10 15:53:05 +08:00
parent 1e652faec7
commit 0a85fbf613
4 changed files with 20 additions and 6 deletions

View File

@ -186,7 +186,7 @@ class FilesController < ApplicationController
@order = ""
@is_remote = false
if params[:project_id]
@isproject = true
@container_type = 0
if params[:sort]
params[:sort].split(",").each do |sort_type|
@ -246,7 +246,7 @@ class FilesController < ApplicationController
format.js
end
elsif params[:course_id]
@isproject = false
@container_type = 1
if params[:sort]
params[:sort].split(",").each do |sort_type|
@ -297,6 +297,9 @@ class FilesController < ApplicationController
@tag_list = attachment_tag_list @all_attachments
render :layout => 'base_courses'
elsif params[:org_subfield_id]
@container_type = 2
# @subfield = params[:org_subfield_id]
end
end

View File

@ -25,8 +25,12 @@
</div>
<% organization.org_subfields.each do |field| %>
<div class="homepageLeftMenuBlock">
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText" %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子"%>
<% if field.field_type == "Post" %>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText" %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子"%>
<% else %>
<%#= link_to "#{field.name}", org_subfield_files_path(field), :class => "homepageMenuText" %>
<% end %>
</div>
<div class="homepageLeftMenuCourses" id="homepageLeftMenuField_<%= field.id %>" style="display:none;">
</div>

View File

@ -1,22 +1,26 @@
<ul class="orgListRow">
<li class="orgListUser fb">已有栏目</li>
<li class="orgListRole fb">状态</li>
<li class="orgListUser fb">状态</li>
<li class="orgListStatus fb">类型</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">动态</li>
<li class="orgListUser">默认</li>
<li class="orgListStatus">默认</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">项目</li>
<li class="orgListUser">默认</li>
<li class="orgListStatus">默认</li>
<div class="cl"></div>
</ul>
<ul class="orgListRow">
<li class="orgListUser">课程</li>
<li class="orgListUser">默认</li>
<li class="orgListStatus">默认</li>
<div class="cl"></div>
</ul>
<% subfields.each do |field| %>
@ -24,6 +28,7 @@
<li class="orgListUser"><div id="subfield_show_<%= field.id %>"><%= field.name %></div><div id="subfield_edit_<%= field.id %>" style="display:none;">
<input type="text" name="name" onblur="update_subfield('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.name %>" style="width:70px;" /></div></li>
<li class="orgListUser">新增</li>
<li class="orgListStatus"><%= field.field_type == "Post" ? "帖子":"资源" %></li>
<%= link_to "删除",org_subfield_path(field), :method => 'delete',:remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr5" %>
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
<div class="cl"></div>

View File

@ -68,4 +68,6 @@ a.linkGrey8:hover {color:#585858;}
.orgMenuArrow {background:url(../images/nav_icon.png) -10px -165px no-repeat; position:relative; display:inline-block; width:20px; height:30px;}
.orgMenuArrow2 {background:url(../images/nav_icon.png) -10px -132px no-repeat; position:relative; display:inline-block; width:20px; height:30px;}
.org_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-53px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 30px;}
#orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;}
#orgUserName {max-width:50px; overflow:hidden; white-space: nowrap; text-overflow: ellipsis; display:inline-block;}
.orgListStatus {width:55px; float:left;}