修改快捷菜单权限问题及样式
This commit is contained in:
parent
6cfda615d6
commit
897eabd57a
|
@ -23,7 +23,7 @@ class OrgSubfieldsController < ApplicationController
|
|||
@organization = Organization.find(params[:id])
|
||||
@org_subfield = OrgSubfield.find_by_sql("select distinct org_subfields.* from org_subfields,"+
|
||||
"subfield_subdomain_dirs where org_subfields.id = subfield_subdomain_dirs.org_subfield_id and "+
|
||||
" org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:name]}'").first
|
||||
" org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir_name]}'").first
|
||||
if @org_subfield.field_type == 'Post'
|
||||
redirect_to organization_path(@organization, :org_subfield_id => @org_subfield.id)
|
||||
end
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<script>
|
||||
function org_upload_files(org_subfield_id){
|
||||
$.ajax({
|
||||
url :"/org_subfields/" + org_subfield_id + "/files/subfield_upload_file?in_org=1",
|
||||
url :"/org_subfields/" + org_subfield_id + "/files/subfield_upload_file",
|
||||
type :'post'
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,16 +7,12 @@
|
|||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
|
||||
<%= form_tag(org_subfield_files_path(org_subfield, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<% if params[:in_org] %>
|
||||
<div class="c_dark">
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="2" checked class="c_dblue">软件</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="3" class="c_dblue">媒体</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="4" class="c_dblue">代码</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="5" class="c_dblue">其他</input></a>
|
||||
</div>
|
||||
<% else %>
|
||||
<input type="hidden" name="org_subfield_attachment_type" value="<%= org_subfield_attachment_type %>">
|
||||
<% end %>
|
||||
<div class="c_dark">
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="2" checked class="c_dblue">软件</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="3" class="c_dblue">媒体</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="4" class="c_dblue">代码</input> <span class="c_grey">|</span>
|
||||
<input name="org_subfield_attachment_type[]" type="checkbox" value="5" class="c_dblue">其他</input></a>
|
||||
</div>
|
||||
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
|
||||
<%= render :partial => 'files/org_subfield_upload_attachment_list', :locals => {:container => org_subfield}%>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,28 +1,47 @@
|
|||
<% courses.each do |course|%>
|
||||
<li class="homepageLeftMenuCoursesLine pr">
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
|
||||
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
|
||||
:title => (course.is_public? ? "公开课程:":"私有课程:")+course.name+"("+course.time.to_s+course.term+")"%>
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %>
|
||||
<ul class="<%= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
<li>
|
||||
<ul class="subNavMenu boxShadow">
|
||||
<% if is_teacher %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :class => 'fl fontGrey2 w48', :target => '_blank' %>
|
||||
<%= link_to '+',homework_common_index_path(:course => course.id,:is_new => 1), :class => 'fr fb', :title => '发布作业',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+", new_course_news_path(course,:is_new=>1), :class => 'fr fb', :title => '发布通知',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if is_teacher || (course.publish_resource == 1 && User.current.member_of_course?(course)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",upload_files_menu_path(:course_id => course.id), :class => 'fr fb',:remote => true, :title => '上传资源' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :class => 'fl fontGrey2', :target => '_blank' %>
|
||||
<%= link_to '+',homework_common_index_path(:course => course.id,:is_new => 1), :class => 'fr fb', :title => '发布作业',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course), :class => 'fl',:target => '_blank' %>
|
||||
<%= link_to "+", new_course_news_path(course,:is_new=>1), :class => 'fr fb', :title => '发布通知',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course), :class => 'fl',:target => '_blank' %>
|
||||
<%= link_to "+",upload_files_menu_path(:course_id => course.id), :class => 'fr fb',:remote => true, :title => '上传资源' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "论坛",course_boards_path(course), :class => 'fl',:target => '_blank' %>
|
||||
<%= link_to "论坛",course_boards_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",course_boards_path(course, :flag => true, :is_new => 1), :class => 'fr fb', :title => '发布帖子',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "资源", project_files_path(project),:remote => true,:class => 'fl fontGrey2' %>
|
||||
<%=link_to "资源", project_files_path(project),:remote => true,:class => 'fl fontGrey2 w48' %>
|
||||
<%=link_to "+", upload_files_menu_path(:project_id => project.id),:remote => true,:class => 'fr fb',:title => '上传资源'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "论坛", project_boards_path(project),:class => 'fl fontGrey2', :target => '_blank'%>
|
||||
<%=link_to "论坛", project_boards_path(project),:class => 'fl fontGrey2 w48', :target => '_blank'%>
|
||||
<%=link_to "+", project_boards_path(project, :flag => true),:class => 'fr fb', :target => '_blank',:title => '发布帖子'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, project)) && rep_is_gitlab?(project) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to '版本库', url_for(:controller => 'projects', :action => 'settings', :id => project.id, :tab=>'repositories') , :target => '_blank',:class => "fl",:title => '版本库' %>
|
||||
<%= link_to '版本库', url_for(:controller => 'projects', :action => 'settings', :id => project.id, :tab=>'repositories') , :target => '_blank',:class => "fl w48",:title => '版本库' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<% end%>
|
||||
</div>
|
||||
<div class="fl ml10">
|
||||
<p class="homepageImageName hidden db mb5">
|
||||
<p class="homepageImageName hidden db mb5" style="margin-left:0px;margin-right:0px;">
|
||||
<%= @user.realname.blank? ? @user.login : @user.realname %>
|
||||
</p>
|
||||
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||
|
|
|
@ -54,7 +54,7 @@ RedmineApp::Application.routes.draw do
|
|||
post 'logout'
|
||||
post 'apply_subdomain'
|
||||
get 'org_resources_subfield'
|
||||
get '/:name', :to => 'org_subfields#show', :as => 'show_org_subfield'
|
||||
get '/:sub_dir_name', :to => 'org_subfields#show', :as => 'show_org_subfield'
|
||||
end
|
||||
collection do
|
||||
get 'check_uniq'
|
||||
|
|
|
@ -30,6 +30,7 @@ ul.shild:hover li ul {display:block;}
|
|||
ul.subNavArrow:hover li ul {display:block;}
|
||||
.subNavMenu {line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:20px; top:-10px; padding:5px 0px; display:none; z-index:999;}
|
||||
.subNavRow {padding:0px 15px; width:70px;}
|
||||
.w48 {width:48px;}
|
||||
|
||||
a.mesIcon {background:url(../images/mes_icon.png) -5px -73px no-repeat; padding-left:23px;}
|
||||
a.personalIcon {background:url(../images/mes_icon.png) -6px -16px no-repeat; padding-left:23px;}
|
||||
|
|
Loading…
Reference in New Issue