Merge remote-tracking branch 'origin/szzh' into guange_dev
This commit is contained in:
commit
7b5021c4fd
|
@ -258,7 +258,7 @@ module Mobile
|
|||
requires :course_id,type: Integer,desc: '课程id'
|
||||
optional :name,type:String,desc:'课件名称可能包含的字符'
|
||||
end
|
||||
get ":course_id/attachments" do
|
||||
post ":course_id/attachments" do
|
||||
cs = CoursesService.new
|
||||
count = cs.course_attachments params
|
||||
present :data, count, with: Mobile::Entities::Attachment
|
||||
|
|
|
@ -94,6 +94,31 @@ module Mobile
|
|||
present :status, 0
|
||||
end
|
||||
|
||||
desc "用户留言"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer,desc: '被留言的用户id'
|
||||
end
|
||||
get ':user_id/messages' do
|
||||
us = UsersService.new
|
||||
jours = us.get_all_messages params
|
||||
present :data,jours,with:Mobile::Entities::Jours
|
||||
present :status,0
|
||||
end
|
||||
|
||||
desc "给用户留言或回复用户留言"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :user_id, type: Integer,desc: '被留言的用户id'
|
||||
requires :content,type:String,desc:'留言内容'
|
||||
optional :refer_user_id,type:Integer,desc:'被回复的用户id'
|
||||
end
|
||||
post ':user_id/leave_message' do
|
||||
us = UsersService.new
|
||||
jours = us.leave_messages params,current_user
|
||||
present :status,0
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,6 +32,9 @@ class BoardsController < ApplicationController
|
|||
#modify by nwb
|
||||
@flag = params[:flag] || false
|
||||
if @project
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
render_403
|
||||
else
|
||||
@boards = @project.boards.includes(:last_message => :author).all
|
||||
@boards = [] << @boards[0] if @boards.any?
|
||||
if @boards.size == 1
|
||||
|
@ -39,6 +42,7 @@ class BoardsController < ApplicationController
|
|||
show and return
|
||||
end
|
||||
render :layout => false if request.xhr?
|
||||
end
|
||||
elsif @course
|
||||
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
||||
@boards = @course.boards.includes(:last_message => :author).all
|
||||
|
|
|
@ -342,10 +342,15 @@ class CoursesController < ApplicationController
|
|||
|
||||
def export_course_member_excel
|
||||
@all_members = student_homework_score(0,0,0,"desc")
|
||||
filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}";
|
||||
# 如果是ie11 需要转码
|
||||
if(/rv\:11\.0/.match(request.env["HTTP_USER_AGENT"]) != nil)
|
||||
filename= URI::encode(filename)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.xls {
|
||||
send_data(member_to_xls(@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present",
|
||||
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}.xls")
|
||||
:filename => "#{filename}.xls")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ class FilesController < ApplicationController
|
|||
before_filter :auth_login1, :only => [:index]
|
||||
before_filter :logged_user_by_apptoken,:only => [:index]
|
||||
before_filter :find_project_by_project_id#, :except => [:getattachtype]
|
||||
before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search,:search_project,:quote_resource_show_project,:search_tag_attachment]
|
||||
before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project,:search_tag_attachment]
|
||||
|
||||
helper :sort
|
||||
include SortHelper
|
||||
|
@ -46,6 +46,13 @@ class FilesController < ApplicationController
|
|||
@obj_attachments = paginateHelper @all_attachments,10
|
||||
end
|
||||
|
||||
def searchone4reload
|
||||
attachment = Attachment.find_by_id(params[:fileid]);
|
||||
respond_to do |format|
|
||||
format.html{render :layout => nil,:locals=>{:file=>attachment,:course=>@course}}
|
||||
end
|
||||
end
|
||||
|
||||
def search
|
||||
sort = ""
|
||||
@sort = ""
|
||||
|
|
|
@ -88,11 +88,6 @@ class IssuesController < ApplicationController
|
|||
:offset => @offset,
|
||||
:limit => @limit)
|
||||
@issue_count_by_group = @query.issue_count_by_group
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
||||
|
|
|
@ -31,7 +31,7 @@ class ProjectsController < ApplicationController
|
|||
before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
|
||||
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
||||
before_filter :file, :statistics, :watcherlist
|
||||
before_filter :file, :statistics #:watcherlist
|
||||
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
||||
before_filter :memberAccess, only: :member
|
||||
|
||||
|
@ -416,12 +416,16 @@ class ProjectsController < ApplicationController
|
|||
@subPage_title = ''
|
||||
@members = @project.member_principals.includes(:roles, :principal).all.sort
|
||||
end
|
||||
else
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
render_403
|
||||
else
|
||||
roles = Role.find_all_givable
|
||||
@subPage_title = l :label_member_list
|
||||
@members = @project.member_principals.includes(:roles, :principal).joins("LEFT JOIN #{OptionNumber.table_name} ON #{OptionNumber.table_name}.user_id = #{Member.table_name}.user_id and #{OptionNumber.table_name}.score_type = 2 AND #{Member.table_name}.project_id = #{OptionNumber.table_name}.project_id").order("#{OptionNumber.table_name}.total_score DESC").all
|
||||
@applied_members = appied_project_members(@project, @members)
|
||||
end
|
||||
end
|
||||
@members = paginateHelper @members
|
||||
render :layout => 'base_courses' if @project.project_type == 1
|
||||
end
|
||||
|
@ -676,11 +680,13 @@ class ProjectsController < ApplicationController
|
|||
true
|
||||
end
|
||||
|
||||
# added by huang
|
||||
|
||||
def watcherlist
|
||||
if @watched
|
||||
@users -= watched.watcher_users
|
||||
unless @project.nil?
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
render_403
|
||||
else
|
||||
@users -= watched.watcher_users if @watched
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -383,6 +383,8 @@ class UsersController < ApplicationController
|
|||
# scope = User.logged.status(@status)
|
||||
# @search_by = params[:search_by] ? params[:search_by][:id] : 0
|
||||
# scope = scope.like(params[:name],@search_by) if params[:name].present?
|
||||
@search_by = params[:search_by] ? params[:search_by] : 0
|
||||
|
||||
us = UsersService.new
|
||||
scope = us.search_user params
|
||||
@user_count = scope.count
|
||||
|
|
|
@ -85,6 +85,9 @@ class WordsController < ApplicationController
|
|||
elsif @journal_destroyed.jour_type == "Course"
|
||||
@course = Course.find @journal_destroyed.jour_id
|
||||
@jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count
|
||||
elsif @journal_destroyed.jour_type == "Principal"
|
||||
@user = User.find(@journal_destroyed.jour_id)
|
||||
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
|
|
@ -593,13 +593,38 @@ module ApplicationHelper
|
|||
Project.project_tree(projects, &block)
|
||||
end
|
||||
|
||||
# 项目版本库可见权限判断
|
||||
# 条件:1、modules中设置不可见或项目没有版本库;2、如果项目是私有或者项目版本库隐藏则必须是项目成员才可见
|
||||
def visible_repository?(project)
|
||||
@result = false
|
||||
unless project.enabled_modules.where("name = 'repository'").empty? || project.repositories.count == 0
|
||||
if (project.hidden_repo || !project.is_public?)
|
||||
if User.current.member_of?(project)
|
||||
@result = true
|
||||
end
|
||||
else
|
||||
@result = true
|
||||
end
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
# 判断当前用户是否为项目管理员
|
||||
def is_project_manager?(user_id, project_id)
|
||||
@result = false
|
||||
mem = Member.where("user_id = ? and project_id = ?",user_id, project_id)
|
||||
unless mem.blank?
|
||||
mem.first.roles.to_s.include?("Manager")
|
||||
@result = mem.first.roles.to_s.include?("Manager") ? true : false
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
# 公开项目资源可以引用,admin和管理员和资源上传者拥有设置公开私有权限
|
||||
def authority_pubilic_for_files(project, file)
|
||||
@result = false
|
||||
if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id || User.current.admin) &&
|
||||
project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project"
|
||||
@result = true
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
|
|
@ -67,29 +67,33 @@ module IssuesHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
#获取跟踪类型
|
||||
#REDO:时间紧需要优化,两个方法可以综合成一个
|
||||
#获取跟踪类型及样式
|
||||
#REDO:时间紧可以优化.
|
||||
def get_issue_type(value)
|
||||
issuetype = []
|
||||
if value == "缺陷" || value == 1
|
||||
class_type = "red_btn_cir ml10"
|
||||
issuetype << "red_btn_cir ml10"
|
||||
issuetype << "缺陷"
|
||||
elsif value == "功能" || value == 2
|
||||
class_type = "blue_btn_cir ml10"
|
||||
issuetype << "blue_btn_cir ml10"
|
||||
issuetype << "功能"
|
||||
elsif value == "支持" || value == 3
|
||||
class_type = "green_btn_cir ml10"
|
||||
issuetype << "green_btn_cir ml10"
|
||||
issuetype << "支持"
|
||||
elsif value == "任务" || value == 4
|
||||
issuetype << "orange_btn_cir ml10"
|
||||
issuetype << "任务"
|
||||
else
|
||||
class_type = "orange_btn_cir ml10"
|
||||
issuetype << "bgreen_btn_cir ml10"
|
||||
issuetype << "周报"
|
||||
end
|
||||
end
|
||||
|
||||
def get_issue_typevalue(value)
|
||||
if value == "缺陷" || value == 1
|
||||
assign = "缺陷"
|
||||
elsif value == "功能" || value == 2
|
||||
assign = "功能"
|
||||
elsif value == "支持" || value == 3
|
||||
assign = "支持"
|
||||
def principals_options_for_isuue_list(project)
|
||||
if User.current.member_of?(project)
|
||||
project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0])
|
||||
else
|
||||
assign = "任务"
|
||||
project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给", 0])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class UsersService
|
|||
include AvatarHelper
|
||||
include CoursesHelper
|
||||
include ApiHelper
|
||||
include WordsHelper
|
||||
#将用户注册的功能函数写这里
|
||||
#参数约定
|
||||
#成功返回注册后的User实例,失败直接抛异常
|
||||
|
@ -154,6 +155,25 @@ class UsersService
|
|||
@user
|
||||
end
|
||||
|
||||
# 获取某个用户的所有留言信息
|
||||
def get_all_messages params
|
||||
user = User.find(params[:user_id])
|
||||
jours = user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||
jours.update_all(:is_readed => true, :status => false)
|
||||
jours.each do |journal|
|
||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||
end
|
||||
jours
|
||||
end
|
||||
|
||||
# 给某个用户留言
|
||||
def leave_messages params,current_user
|
||||
user = User.find(params[:user_id])
|
||||
user.add_jour(current_user, params[:content], params[:refer_user_id] ||= 0)
|
||||
unless params[:refer_user_id].nil? || params[:refer_user_id] == 0 || params[:refer_user_id] == User.current.id
|
||||
User.find(params[:refer_user_id]).add_jour(current_user, params[:content], params[:refer_user_id])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
@ -206,10 +226,18 @@ class UsersService
|
|||
}
|
||||
scope = User.logged.status(status)
|
||||
if params[:is_search_assitant].nil?
|
||||
#modify by yutao 2015/5/18 没有params[:user_id]参数时去掉"id not in (?)"条件(bug:#2270) start
|
||||
#say by yutao: params[:user_id]这个是指谁发起的搜索么? 如果是 这个值貌似应该从session获取 怪怪的赶脚-_-!
|
||||
search_by = params[:search_by] ? params[:search_by] : "0"
|
||||
if params[:name].present?
|
||||
if !params[:user_id].nil?
|
||||
watcher = User.watched_by(params[:user_id])
|
||||
watcher.push(params[:user_id])
|
||||
search_by = params[:search_by] ? params[:search_by] : "0"
|
||||
scope = scope.where("id not in (?)",watcher).like(params[:name],search_by) if params[:name].present?
|
||||
scope = scope.where("id not in (?)",watcher)
|
||||
end
|
||||
scope = scope.like(params[:name],search_by)
|
||||
end
|
||||
#modify by yutao 2015/5/18 没有params[:user_id]参数时去掉"id not in (?)"条件 end
|
||||
else
|
||||
teachers = searchTeacherAndAssistant(Course.find(params[:course_id]))
|
||||
scope = scope.where("id not in (?)",teachers.map{|t| t.user_id}).like(params[:name],search_by) if params[:name].present?
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
<div class="attachments" style="font-weight:normal;">
|
||||
<% is_float ||= false %>
|
||||
<% for attachment in attachments %>
|
||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:10px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
|
@ -50,9 +51,10 @@
|
|||
:id => attachment,
|
||||
:filename => attachment.filename%>
|
||||
<% end %>
|
||||
<span title="<%= attachment.description%>">
|
||||
<%= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="float:left;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" title="<%= attachment.description%>">
|
||||
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
||||
</div>
|
||||
<span class="size">(
|
||||
<%= number_to_human_size attachment.filesize %>)
|
||||
</span>
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
$("#error_show").html("<%= @message.html_safe %>");
|
||||
<% else %>
|
||||
closeModal();
|
||||
searchone4reload('<%=params[:file_id]%>');
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
<script>
|
||||
function searchone4reload(fileid){
|
||||
var url = "<%= searchone4reload_course_files_path(@course)%>";
|
||||
var data = {};data.fileid=fileid;
|
||||
$.ajax({
|
||||
url:url,dataType:'text',data:data,success:function(text){
|
||||
var container_file_div = $("#container_files_"+fileid);
|
||||
container_file_div.after(text);
|
||||
container_file_div.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
function show_upload(obj)
|
||||
{
|
||||
switch(obj)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class="for_img_thumbnails">
|
||||
<% curse_attachments.each do |file| %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) %>
|
||||
<div class="re_con_box">
|
||||
<div class="re_con_box" id="container_files_<%= file.id %>">
|
||||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s,:class => "c_dblue f_14 f_b f_l hiddent" %>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -20,10 +20,12 @@
|
|||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<%#--私有项目资源不能引用,不能设置公开私有--%>
|
||||
<%#--公开项目资源可以应用,管理员和资源上传者拥有设置公开私有权限--%>
|
||||
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% if (is_project_manager?(User.current.id, @project.id) || file.author_id == User.current.id) && project_contains_attachment?(project,file) && file.container_id == project.id && file.container_type == "Project" %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% end %>
|
||||
<% if authority_pubilic_for_files(project, file) %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %>
|
||||
</span>
|
||||
|
|
|
@ -27,6 +27,8 @@ $('#upload_file_div').slideToggle('slow');
|
|||
<%elsif @course%>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<% delete_allowed = User.current.allowed_to?(:manage_files, course) %>
|
||||
<% if file.is_public? || User.current.member_of_course?(course) %>
|
||||
<div class="re_con_box" id="container_files_<%= file.id %>">
|
||||
<div class="">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s,:class => "c_dblue f_14 f_b f_l hiddent" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
|
||||
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open c_blue",:method => :post %>
|
||||
</span>
|
||||
<% else %>
|
||||
<!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> -->
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="">
|
||||
<p class="f_l mb5 c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<%= link_to( l(:button_delete), attachment_path(file),
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
|
||||
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="tag_h">
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
|
||||
<%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!---re_con_box end-->
|
||||
<% else %>
|
||||
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
||||
<% end %>
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %>
|
||||
<span class="fl"><%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):</span>
|
||||
<div class="problem_tit_div fl">
|
||||
<%=link_to "#{column_content[4]}<span class = '#{get_issue_type(column_content[1])}'>#{get_issue_typevalue(column_content[1])}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
|
||||
<%=link_to "#{column_content[4]}<span class = '#{get_issue_type(column_content[1])[0]}'>#{get_issue_type(column_content[1])[1]}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</div><!--problem_search end-->
|
||||
|
||||
<div id="filter_form" class="fr" >
|
||||
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给",0]),
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"v[assigned_to_id]",:class=>"w90"}
|
||||
|
@ -66,8 +66,8 @@
|
|||
</div><!--filter_form end-->
|
||||
<div class="cl"></div>
|
||||
<%# end %>
|
||||
<p class="problem_p fl" ><%= l(:label_issues_sum) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.count %></a>
|
||||
<%= l(:lable_issues_undo) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.where('status_id in (1,2,4,6)').count %> </a>
|
||||
<p class="problem_p fl" ><%= l(:label_issues_sum) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.visible.all.count %></a>
|
||||
<%= l(:lable_issues_undo) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.where('status_id in (1,2,4,6)').visible.all.count %> </a>
|
||||
</p>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
|
||||
$("#v_subject").focus();
|
||||
$("#v_subject").blur();
|
|
@ -2,7 +2,6 @@
|
|||
<h2 class="project_h2"><%= l(:label_issue_new) %></h2>
|
||||
</div>
|
||||
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
|
||||
|
||||
<%= labelled_form_for @issue, :url => project_issues_path(@project),
|
||||
:html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue' %>
|
||||
|
@ -16,7 +15,6 @@
|
|||
</a>
|
||||
<%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="talk_txt fl">
|
||||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<%= @issue.subject %>
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)}" %>'><%= get_issue_typevalue(@issue.tracker_id) %></span>
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]}" %>'><%= get_issue_type(@issue.tracker_id)[1] %></span>
|
||||
</p><br/>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
||||
<% unless @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %>
|
||||
<% if @project.hidden_repo || !@project.is_public? %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!-- more -->
|
||||
<div class="subNav subNav_jiantou" onclick="$('#navContent').toggle(500);" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
|
@ -1,29 +0,0 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,40 +0,0 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
|
@ -20,5 +20,4 @@
|
|||
!Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
|
||||
<%= exit_project_link(@project) %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<span>| </span>
|
||||
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue' %>)</div>
|
||||
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--课程信息 end-->
|
||||
<div class="info_box">
|
||||
|
@ -127,7 +127,7 @@
|
|||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %>
|
||||
<%= link_to "(#{course_file_num})", course_files_path(@course), :class => "subnav_num c_orange" %>
|
||||
<%= link_to "(#{course_file_num})", course_files_path(@course), :class => "subnav_num c_orange",:id=>'courses_files_count_nav' %>
|
||||
<%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
|
|
|
@ -35,43 +35,6 @@
|
|||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
<script type="text/javascript">
|
||||
function regexName()
|
||||
{
|
||||
var name = $.trim($("#name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#project_name_span").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#project_name_span").css('color','#ff0000');
|
||||
$("#project_name_span").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#project_search_form").submit();}
|
||||
}
|
||||
</script>
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
<span id="project_name_span" style="float: left"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/forums", forums_path %></a></td>
|
||||
|
|
|
@ -43,19 +43,19 @@
|
|||
if(data == 1)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team), 1))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>');
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/development_group')) %>');
|
||||
$("#close_light").attr("onClick","close_window('development_group');");
|
||||
}
|
||||
else if(data == 2)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group), 2))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_research_team')) %>');
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/research_team')) %>');
|
||||
$("#close_light").attr("onClick","close_window('research_group');");
|
||||
}
|
||||
else if(data == 3)
|
||||
{
|
||||
$("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization), 3))%>");
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_friend_group')) %>');
|
||||
$("#project_memu_list").html('<%= escape_javascript(render(:partial => 'projects/friend_group')) %>');
|
||||
$("#close_light").attr("onClick","close_window('friend_organization');");
|
||||
}
|
||||
else
|
||||
|
@ -93,7 +93,6 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="search fl">
|
||||
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
|
||||
<a href="#" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
|
||||
|
@ -136,8 +135,7 @@
|
|||
<%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id
|
||||
}, :class => "c_orange f14" ) %>
|
||||
:id => @project.id}, :class => "c_orange f14" ) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -157,7 +155,7 @@
|
|||
<!--邀请加入-->
|
||||
<div class="subNavBox">
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" onclick="$('#navContent_invit').toggle(500);"><%= l(:label_invite)%></div>
|
||||
<div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" nhtype="toggle4cookie" data-id="expand_invit" data-target="#navContent_invit"><%= l(:label_invite)%></div>
|
||||
<ul class="navContent " style="display:block" id="navContent_invit">
|
||||
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
|
||||
<% if User.current.allowed_to?(:manage_members, @project) %>
|
||||
|
@ -169,11 +167,11 @@
|
|||
<!--project_new_type: 1为开发组;2为科研组;3为朋友圈子-->
|
||||
<div id="project_memu_list">
|
||||
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
||||
<%= render :partial => 'layouts/base_development_group', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project}%>
|
||||
<% elsif @project.project_new_type == 2 %>
|
||||
<%= render :partial => 'layouts/base_research_team', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/research_team', :locals => {:project => @project}%>
|
||||
<% else %>
|
||||
<%= render :partial => 'layouts/base_friend_group', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project}%>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.visible.all.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
||||
<% if visible_repository?(@project) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- more -->
|
||||
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
|
@ -0,0 +1,29 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,40 @@
|
|||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.issues.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.boards.first.topics.count == 0 %>
|
||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless attaments_num == 0 %>
|
||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
|
@ -1,6 +1,6 @@
|
|||
<script type="text/javascript">
|
||||
<%if @select_tab%>
|
||||
$(function(){
|
||||
<%if @select_tab%>
|
||||
<%if @select_tab == "modules"%>
|
||||
project_setting(2);
|
||||
<% elsif @select_tab == "versions"%>
|
||||
|
@ -10,10 +10,10 @@
|
|||
project_setting(6);
|
||||
$("#pro_st_edit_ku").toggle();
|
||||
<%else%>
|
||||
|
||||
<% end%>
|
||||
<% end%>
|
||||
$("div[nhname='pro_setting']").show();
|
||||
});
|
||||
<% end%>
|
||||
</script>
|
||||
|
||||
<div class="project_r_h">
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
|
||||
<!--通过admin界面配置,不同角色显示不同的模块-->
|
||||
<div class=" pro_setting">
|
||||
<div class=" pro_setting" nhname="pro_setting" style="display:none;">
|
||||
<div id="pro_st_tb_" class="pro_st_tb_">
|
||||
<ul>
|
||||
<% show_memu = show_project_memu User.current%>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+province,
|
||||
url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+encodeURIComponent(province),
|
||||
data :'text',
|
||||
success: function(data){
|
||||
$("#schoollist").html(data);
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
</div>
|
||||
<!-- 上左下右 -->
|
||||
<div class='desc_item'>
|
||||
<span class=''>
|
||||
<div class='' style="float:left;max-width:300px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">
|
||||
<% unless course.is_public == 1 %>
|
||||
<span class="private_project"><%= l(:label_private) %></span>
|
||||
<% end %>
|
||||
<%= link_to(course.name.truncate(25, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
<%= link_to(course.name+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<span class='font_bolder'>
|
||||
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||
<%#=course.try(:teacher).try(:name)%>
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
$('#jours_count').html("<%= @jours_count %>");
|
||||
<% elsif @course && @jours_count%>
|
||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||
<% elsif @user && @jours_count%>
|
||||
$('#jour_count').html("<%= @jours_count %>");
|
||||
<% end %>
|
||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
||||
destroyedItem.fadeOut(600,function(){
|
||||
|
|
|
@ -393,6 +393,7 @@ zh:
|
|||
label_document_added: 文档已添加
|
||||
label_forum_message_added: 贴吧发帖成功
|
||||
label_forum_add: 贴吧创建成功
|
||||
label_forum_reply: 贴吧回复成功
|
||||
label_message_reply: 回帖人
|
||||
label_document_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该文档。)
|
||||
label_role: 角色
|
||||
|
|
|
@ -715,6 +715,7 @@ RedmineApp::Application.routes.draw do
|
|||
collection do
|
||||
match "getattachtype", :via => [:get, :post]
|
||||
match "search",:via => [:post,:get]
|
||||
match "searchone4reload",:via => [:post,:get]
|
||||
match "search_tag_attachment", :via => [:post,:get]
|
||||
end
|
||||
member do
|
||||
|
|
|
@ -541,7 +541,6 @@ ActiveRecord::Schema.define(:version => 20150514133640) do
|
|||
t.integer "is_teacher_score", :default => 0
|
||||
end
|
||||
|
||||
add_index "homework_attaches", ["bid_id"], :name => "bid_id"
|
||||
add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id"
|
||||
|
||||
create_table "homework_evaluations", :force => true do |t|
|
||||
|
@ -556,9 +555,7 @@ ActiveRecord::Schema.define(:version => 20150514133640) do
|
|||
t.integer "bid_id"
|
||||
end
|
||||
|
||||
add_index "homework_for_courses", ["bid_id"], :name => "bid_id"
|
||||
add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id"
|
||||
add_index "homework_for_courses", ["course_id"], :name => "course_id"
|
||||
add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id"
|
||||
|
||||
create_table "homework_users", :force => true do |t|
|
||||
|
@ -1165,12 +1162,10 @@ ActiveRecord::Schema.define(:version => 20150514133640) do
|
|||
t.integer "course_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "student_idCopy"
|
||||
end
|
||||
|
||||
add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id"
|
||||
add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id"
|
||||
add_index "students_for_courses", ["student_id"], :name => "student_id"
|
||||
|
||||
create_table "taggings", :force => true do |t|
|
||||
t.integer "tag_id"
|
||||
|
|
|
@ -20,8 +20,8 @@ module Redmine
|
|||
notifications << Notifiable.new('message_posted')
|
||||
notifications << Notifiable.new('wiki_content_added')
|
||||
notifications << Notifiable.new('wiki_content_updated')
|
||||
notifications << Notifiable.new('forum_add')
|
||||
notifications << Notifiable.new('forum_message_added', 'forum_add')
|
||||
notifications << Notifiable.new('forum_reply')
|
||||
notifications << Notifiable.new('forum_message_added', 'forum_reply')
|
||||
notifications
|
||||
end
|
||||
end
|
||||
|
|
|
@ -385,3 +385,44 @@ function submitProjectBoard()
|
|||
$("#message-form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
//cookie记忆html区块 显示/隐藏 的代码 start
|
||||
$(function(){
|
||||
var personalized_expand_key = "personalized_expand";
|
||||
function personalized_init(){
|
||||
var personalized_map = cookieget(personalized_expand_key);
|
||||
if(personalized_map!=false){
|
||||
personalized_map = JSON.parse(personalized_map);
|
||||
$("*[nhtype='toggle4cookie']").each(function(){
|
||||
var personalized_id=$(this).data('id');
|
||||
var val = personalized_map[personalized_id];
|
||||
if(val!=undefined && val!=$(this).data('val')){
|
||||
personalized_click($(this),0);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function personalized_click(obj,timeout){
|
||||
var target = $(obj.data('target'));
|
||||
var oldval = obj.data('val');
|
||||
var val='';
|
||||
if(oldval=='expand'){val='retract';}else{val='expand';}
|
||||
obj.data('val',val);
|
||||
var personalized_map = cookieget(personalized_expand_key);
|
||||
if(personalized_map == false){
|
||||
personalized_map={};
|
||||
}else{
|
||||
personalized_map = JSON.parse(personalized_map);
|
||||
}
|
||||
var personalized_id=obj.data('id');
|
||||
personalized_map[personalized_id]=val;
|
||||
cookiesave(personalized_expand_key,JSON.stringify(personalized_map));
|
||||
target.toggle(timeout);
|
||||
}
|
||||
$("*[nhtype='toggle4cookie']").click(function(){
|
||||
personalized_click($(this),500);
|
||||
});
|
||||
|
||||
personalized_init();
|
||||
});
|
||||
//cookie记忆html区块 显示/隐藏 的代码 end
|
|
@ -1904,6 +1904,18 @@ input.autocomplete.ajax-loading {
|
|||
background-image: url(../images/loading.gif);
|
||||
}
|
||||
|
||||
.private_project {
|
||||
position: relative;
|
||||
bottom: 2px;
|
||||
text-transform: uppercase;
|
||||
background: #d22;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
padding: 0px 2px 0px 2px;
|
||||
font-size: 60%;
|
||||
margin-right: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
/***** Flash & error messages ****/
|
||||
#errorExplanation, div.flash, .nodata, .warning, .conflict {
|
||||
padding: 4px 4px 4px 30px;
|
||||
|
|
|
@ -177,6 +177,7 @@ a:hover.blue_u_btn{background:#64bdd9; color:#fff;}
|
|||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
||||
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
||||
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;}
|
||||
.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;}
|
||||
/* commonpic */
|
||||
.pic_date{ display:block; background:url(../images/new_project/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;}
|
||||
.pic_add{ display:block; background:url(../images/new_project/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;}
|
||||
|
|
Loading…
Reference in New Issue