Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject

Conflicts:
	app/views/projects/_act_issues.html.erb
This commit is contained in:
daiao 2016-11-07 13:30:15 +08:00
commit e70c66b5ac
62 changed files with 755 additions and 448 deletions

View File

@ -50,10 +50,10 @@ gem 'elasticsearch-model'
gem 'elasticsearch-rails'
#rails 3.2.22.2 bug
#gem "test-unit", "~>3.0"
gem "test-unit", "~>3.0"
### profile
# gem 'oneapm_rpm'
gem 'oneapm_rpm'
group :development do
gem 'grape-swagger'

View File

@ -1,3 +1,4 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
#
@ -31,6 +32,74 @@ class AdminController < ApplicationController
@no_configuration_data = Redmine::DefaultData::Loader::no_data?
end
def export_rep_static_users
rev = params[:rev]
cycle = params[:cycle]
cycle_name = (params[:cycle] == "admin_week" ? l(:label_per_week) : (params[:cycle] == "admin_month" ? l(:label_per_month) : l(:label_per_all)))
respond_to do |format|
format.html
format.xls{
filename = "#{l(:label_user_rep_xls)}_#{cycle_name}.xls"
send_data(admin_export_rep_xls(:rev => rev, :cycle => "1"), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
end
# 管理员界面导出所有项目代码、提交次数统计
def admin_export_rep_xls (options = {})
cycle = params[:cycle]
g = Gitlab.client
users_results = []
User.first(13).each do |user|
unless user.mail.nil?
user_mail = user.mail
user.projects.where("gpid is not null").each do |project|
begin
g.branches(project.gpid).each do |branch|
if cycle == "admin_week"
statics = g.admin_rep_stats_week(project.gpid, :rev => branch.name, :user_mail => user_mail)
elsif cycle == "admin_month"
statics = g.admin_rep_stats_month(project.gpid, :rev => branch.name, :user_mail => user_mail)
elsif cycle == "admin_all"
statics = g.admin_rep_stats_all(project.gpid, :rev => branch.name, :user_mail => user_mail)
end
unless statics.first.commits_num == "0"
user_details = {:user_id => user.id, :user_name => user.show_name, :project_id => project.id, :project_name => project.name,
:commits_num => statics.first.commits_num, :add => statics.first.add, :del => statics.first.del, :changes => statics.first.changes, :branch => branch.name}
users_results << user_details
end
end
rescue Exception => e
puts e
end
end
end
end
xls_report = StringIO.new
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet :name => l(:project_module_repository)
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
sheet1.row(0).default_format = blue
sheet1.row(0).concat([l(:label_rep_user_id),l(:label_rep_user_name),l(:label_rep_project_id),l(:label_rep_project_name),l(:rep_branch),l(:rep_changeset),l(:rep_code_add),l(:rep_code_delete),l(:rep_code_modified),l(:rep_sode_time)])
count_row = 1
users_results.each do |static|
sheet1[count_row,0] = static[:user_id]
sheet1[count_row,1] = static[:user_name]
sheet1[count_row,2] = static[:project_id]
sheet1[count_row,3] = static[:project_name]
sheet1[count_row,4] = static[:branch]
sheet1[count_row,5] = static[:commits_num]
sheet1[count_row,6] = static[:add]
sheet1[count_row,7] = static[:del]
sheet1[count_row,8] = static[:changes]
sheet1[count_row,9] = Time.now.strftime('%Y-%m-%d %H:%M:%S')
count_row += 1
end
book.write xls_report
xls_report.string
end
# 管理员界面 项目列表
def projects
=begin

View File

@ -227,7 +227,15 @@ class CoursesController < ApplicationController
end
def deletegroup
CourseGroup.delete(params[:group_id])
group = CourseGroup.find params[:group_id]
if group
if group.members.count == 0
CourseGroup.delete(params[:group_id])
else
group.members.update_all(:course_group_id => 0)
CourseGroup.delete(params[:group_id])
end
end
@subPage_title = l :label_student_list
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@ -395,6 +403,7 @@ class CoursesController < ApplicationController
page_from = params[:page].nil? ? 0 : (params[:page].to_i - 1)
@results = student_homework_score(0,page_from, 10,"desc")
end
@no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count
@course_groups = @course.course_groups
@limit = 50
@page = params[:page].nil? ? 1 : params['page'].to_i

View File

@ -90,6 +90,10 @@ class HomeworkCommonController < ApplicationController
@homework.homework_tests.destroy_all
elsif @homework.homework_type == 3
@homework.homework_detail_group.destroy if @homework.homework_detail_group
create_works_list @homework
end
if params[:homework_type].to_i == 3
@homework.student_works.destroy_all
end
end
@homework.homework_type = params[:homework_type].to_i || @homework.homework_type

View File

@ -624,9 +624,17 @@ class IssuesController < ApplicationController
@project_sort = 'issues.updated_on asc'
end
end
# 搜索结果
@issues_filter = @query.issues(:order => @project_sort)
# if params[:type] == 1 || params[:type].nil?
# @results = @issues_filter
# elsif params[:type] == "2"
# @results = @issues_filter.collect{|result| result.status_id !=5 }
# elsif params[:type] == "3"
# @results = @issues_filter.collect{|result| result.status_id !=5 }
# end
#统计
@results = {}

View File

@ -45,6 +45,9 @@ class JournalsController < ApplicationController
end
def diff
# 顶部导航
@project_menu_type = 2
@issue = @journal.issue
if params[:detail_id].present?
@detail = @journal.details.find_by_id(params[:detail_id])
@ -55,7 +58,7 @@ class JournalsController < ApplicationController
@diff = Redmine::Helpers::Diff.new(@detail.value, @detail.old_value)
respond_to do |format|
format.html {
render :layout => 'new_base'
render :layout => 'base_projects'
}
end
end

View File

@ -104,6 +104,7 @@ class MembersController < ApplicationController
@applied_message = AppliedMessage.find(params[:applied_message_id])
# @applied_message.update_attribute(:status, 3)
applied_project = @applied_message.applied
project = Project.find(@applied_message.project_id)
# 发送消息给被拒者,user_id对应的收到信息的用户
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 4,
:viewed => false, :applied_user_id => @applied_message.user_id, :role => applied_project.role, :project_id => applied_project.project_id)

View File

@ -18,7 +18,7 @@
# Author lizanle
# Description 封装代码,简化代码,格式化代码,
class ProjectsController < ApplicationController
layout :select_project_layout
layout 'base_projects'
before_filter :authorize1, :only => [:show]
menu_item :overview, :only => :show
menu_item :roadmap, :only => :roadmap
@ -671,7 +671,7 @@ class ProjectsController < ApplicationController
g = Gitlab.client
begin
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_path)
# result.time = distance_of_time_in_words(result.time, Time.now)
result = {:message => result.message, :author_name => User.find_by_mail(result.author_email).nil? ? result.author_email : User.find_by_mail(result.author_email).show_name, :time => distance_of_time_in_words(result.time, Time.now)}
rescue Exception => e
puts e
end

View File

@ -40,12 +40,12 @@ class RepositoriesController < ApplicationController
# before_filter :connect_gitlab, :only => [:quality_analysis, :commit_diff]
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff, :project_archive, :quality_analysis]
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis]
# 版本库新增权限
before_filter :show_rep, :only => [:show]
# before_filter :show_rep, :only => [:show, :stats, :revisions, :revision, :diff, :commit_diff ]
accept_rss_auth :revisions
# hidden repositories filter // 隐藏代码过滤器
before_filter :check_hidden_repo, :only => [:stats, :revisions, :revision, :diff ]
# before_filter :check_hidden_repo, :only => [:stats, :revisions, :revision, :diff ]
helper :repositories
include RepositoriesHelper
helper :project_score
@ -72,16 +72,36 @@ class RepositoriesController < ApplicationController
end
def export_rep_static
@project = Project.find(params[:id])
gpid = @project.gpid
rev = params[:rev]
cycle = params[:cycle]
respond_to do |format|
format.html
format.xls{
filename = "#{@project.name.to_s}_#{l(:label_rep_xls)}.xls"
send_data(export_rep_xls(gpid, :rev => rev, :cycle => "1"), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
# 管理员界面导出所有项目
if params[:cycle] == "admin_week" || params[:cycle] == "admin_month" || params[:cycle] == "admin_all"
if User.current.admin?
@project = Project.find(params[:id])
gpid = @project.gpid
rev = params[:rev]
cycle = params[:cycle]
cycle_name = (params[:cycle] == "admin_week" ? "每周" : (params[:cycle] == "admin_month" ? "每月" : "所有"))
respond_to do |format|
format.html
format.xls{
filename = "#{l(:label_user_rep_xls)}_#{l(:cycle_name)}_.xls"
send_data(admin_export_rep_xls(gpid, :rev => rev, :cycle => "1"), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
else
render_403
end
else
@project = Project.find(params[:id])
gpid = @project.gpid
rev = params[:rev]
cycle = params[:cycle]
respond_to do |format|
format.html
format.xls{
filename = "#{@project.name.to_s}_#{l(:label_rep_xls)}.xls"
send_data(export_rep_xls(gpid, :rev => rev, :cycle => cycle), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
end
end
@ -428,6 +448,9 @@ update
end
def changes
# 顶部导航
@project_menu_type = 5
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
g = Gitlab.client
@ -686,10 +709,7 @@ update
end
def show_rep
if !User.current.member_of?(@project) && @project.hidden_repo
render_403
return
end
visible_repository?(@project)
end
def find_repository
@ -945,15 +965,4 @@ update
graph.burn
end
def check_hidden_repo
project = Project.find(params[:id])
if !User.current.member_of?(project)
if project.hidden_repo
#render_403
end
end
rescue ActiveRecord::RecordNotFound
render_404
end
end

View File

@ -39,9 +39,17 @@ class WatchersController < ApplicationController
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
if params[:object_type] == 'project'
@project = Project.find(params[:object_id])
respond_to do |format|
format.js
end
else
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
end
rescue Exception => e
if e.message == "404"
@ -71,9 +79,16 @@ class WatchersController < ApplicationController
@action = 'fans'
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
if params[:object_type] == 'project'
@project = Project.find(params[:object_id])
respond_to do |format|
format.js
end
else
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
end
rescue Exception => e
if e.message == "404"

View File

@ -49,6 +49,11 @@ module ApplicationHelper
(hidden_info && hidden_info.value == "1") ? true : false
end
# 获取当前用户的fork数量
def get_fork_from_project forked_from_project_id
Project.find(forked_from_project_id)
end
# 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换
def get_user_by_mail mail
user = User.find_by_mail(mail)
@ -3671,7 +3676,7 @@ end
def create_works_list homework
unless homework.course.nil?
students = homework.course.student
if !students.empty?
if !students.empty? && homework.student_works.empty?
name = homework.name
name_str = name + "的作品提交"
str = ""

View File

@ -10,4 +10,5 @@ module OwnerTypeHelper
BLOGCOMMENT = 9
SYLLABUS = 10
ArticleHomepage = 11
PROJECT = 12
end

View File

@ -21,6 +21,68 @@ include AvatarHelper
include StudentWorkHelper
include ApiHelper
module ProjectsHelper
# 时间转换
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
options = {
:scope => :'datetime.distance_in_words',
}.merge!(options)
from_time = from_time.to_time if from_time.respond_to?(:to_time)
to_time = to_time.to_time if to_time.respond_to?(:to_time)
distance = (to_time.to_f - from_time.to_f).abs
distance_in_minutes = (distance / 60.0).round
distance_in_seconds = distance.round
I18n.with_options :locale => options[:locale], :scope => options[:scope] do |locale|
case distance_in_minutes
when 0..1
return distance_in_minutes == 0 ?
locale.t(:less_than_x_minutes, :count => 1) :
locale.t(:x_minutes, :count => distance_in_minutes) unless include_seconds
case distance_in_seconds
when 0..4 then locale.t :less_than_x_seconds, :count => 5
when 5..9 then locale.t :less_than_x_seconds, :count => 10
when 10..19 then locale.t :less_than_x_seconds, :count => 20
when 20..39 then locale.t :half_a_minute
when 40..59 then locale.t :less_than_x_minutes, :count => 1
else locale.t :x_minutes, :count => 1
end
when 2..44 then locale.t :x_minutes, :count => distance_in_minutes
when 45..89 then locale.t :about_x_hours, :count => 1
when 90..1439 then locale.t :about_x_hours, :count => (distance_in_minutes.to_f / 60.0).round
when 1440..2519 then locale.t :x_days, :count => 1
when 2520..43199 then locale.t :x_days, :count => (distance_in_minutes.to_f / 1440.0).round
when 43200..86399 then locale.t :about_x_months, :count => 1
when 86400..525599 then locale.t :x_months, :count => (distance_in_minutes.to_f / 43200.0).round
else
fyear = from_time.year
fyear += 1 if from_time.month >= 3
tyear = to_time.year
tyear -= 1 if to_time.month < 3
leap_years = (fyear > tyear) ? 0 : (fyear..tyear).count{|x| Date.leap?(x)}
minute_offset_for_leap_year = leap_years * 1440
# Discount the leap year days when calculating year distance.
# e.g. if there are 20 leap year days between 2 dates having the same day
# and month then the based on 365 days calculation
# the distance in years will come out to over 80 years when in written
# english it would read better as about 80 years.
minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
remainder = (minutes_with_offset % 525600)
distance_in_years = (minutes_with_offset.div 525600)
if remainder < 131400
locale.t(:about_x_years, :count => distance_in_years)
elsif remainder < 394200
locale.t(:over_x_years, :count => distance_in_years)
else
locale.t(:almost_x_years, :count => distance_in_years + 1)
end
end
end
end
def link_to_version(version, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02"

View File

@ -27,6 +27,11 @@ module RepositoriesHelper
REPO_IP_ADDRESS = Setting.host_repository
REPO_GITLAB_ADDRESS = "git.trustie.net"
# 因为gitlab的提交总数不是实时同步的说以取总数用两种方法
def choise_commit_count git_count, pro_count
git_count > pro_count ? git_count : pro_count
end
# 某个成员不能拥有同名版本库,不同的成员可以创建同名版本库
def is_sigle_identifier?(user_id, iden)
projects = Project.where("user_id =?",user_id)

View File

@ -126,7 +126,7 @@ module UsersHelper
when 4
"婉拒您"
when 5,3,2,1,7
"申请:"
"申请"
when 6
"同意您"
end

View File

@ -77,6 +77,11 @@
</div>
<% html_title(l(:label_project_plural)) -%>
<div class="fr">项目代码/提交数统计:
<%= link_to "最近一周", {:controller => 'admin', :action => 'export_rep_static_users', :format => 'xls', :cycle => "admin_week" }, :confirm => l(:label_rep_admin_export_tip), :class => "linkBlue2" %> <a style="color: #7f7f7f;">|</a>
<%= link_to "最近一月", {:controller => 'admin', :action => 'export_rep_static_users', :format => 'xls', :cycle => "admin_month" }, :confirm => l(:label_rep_admin_export_tip), :class => "linkBlue2" %><a style="color: #7f7f7f;">|</a>
<%= link_to "所有", {:controller => 'admin', :action => 'export_rep_static_users', :format => 'xls', :cycle => "admin_all" }, :confirm => l(:label_rep_admin_export_tip), :class => "linkBlue2" %>
</div>
<script>
function delcfm() {

View File

@ -0,0 +1,14 @@
<br>
<div style='width:380px;text-align:center;font-family: "微软雅黑","宋体"' class="f14">
<% if count == 0 %>
确定删除分班吗?
<% else %>
已有学生加入本分班,删除之后,这些学生将处于未分班状态
您是否确定删除该分班
<% end %>
</div>
</br>
<div style='width:164px; margin:0 auto; text-align:center; font-family: "微软雅黑","宋体"'>
<%=link_to '确定', deletegroup_course_path(:group_id => group_id), :method => 'delete', :remote => true, :class => 'Blue-btn fl', :method => 'delete'%>
<a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a>
</div>

View File

@ -10,20 +10,27 @@
<% unless course_groups.nil? %>
<% course_groups.each do |group| %>
<script>
function delete_group_<%= group.id%>(){
var htmlvalue = '<%=escape_javascript(render :partial => 'delete_member_group', :locals => {:group_id => group.id, :count => group.members.count}) %>';
pop_up_box(htmlvalue, 400);
}
</script>
<%# group_name = " #{ group.name}( <span class='c_red'>#{group.members.count.to_s}人</span>)".html_safe %>
<li class="fl sy_fenban_list clear mr10 mb10">
<%= link_to group.name, searchgroupmembers_course_path(@course,:group_id => group.id), class: 'fl mr5', method: 'get', remote: true,:onclick => "checkclass('group_name_#{group.id}')"%>
<span class="fl sy_cgrey mr5">(<%=group.members.count.to_s %>人)</span>
<% if @canShowCode%>
<a href="javascript:void(0)" class="sy_icons_edit fl" onclick="$('#edit_group_name').val('<%= group.name%>');$('#edit_group_id').val('<%= group.id%>');$('#edit_group_form').slideToggle();"></a>
<% if group.members.empty?%>
<%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
<%# if group.members.empty?%>
<%#= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
:data => {confirm: l(:label_delete_group)},
:class => 'sy_icons_del fl'
%>
<% else%>
<a href="javascript:void(0)" onClick="alert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" class="sy_icons_del fl"></a>
<% end%>
<!--<a href="javascript:void(0)" onClick="pop_up_box('<%#=escape_javascript(render :partial => 'delete_no_member_group', :locals => {:group_id => group.id}) %>');" class="sy_icons_del fl"></a>-->
<%# else%>
<a href="javascript:void(0)" onClick="delete_group_<%= group.id%>();" class="sy_icons_del fl"></a>
<%#end%>
<% end %>
</li>
<% end %>

View File

@ -4,7 +4,7 @@
<% if show_nav?(course_board ? course_board.topics.count : 0) %>
<li>
<a href="<%=course_boards_path(@course) %>">讨论区</a>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
</li>
<% unless course_board.children.empty? %>
<ul class="sub-menu">
@ -12,7 +12,7 @@
<li>
<% count = board ? (board.topics.count + Message.where("board_id =? and parent_id is not ?", board.id, nil).count) : 0 %>
<a href="<%=course_boards_path(@course, :board_id =>board.id) %>"><%=board.name %><span><%=count %></span></a>
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
</li>
<% end %>
</ul>

View File

@ -1,2 +1,4 @@
hideModal();
$("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>");
$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>");
$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>");
$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>");

View File

@ -12,12 +12,15 @@
<span><%=@syllabus.title %></span>
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
<% end %>
<div class="cl"></div>
<span class="c_red ml80" id="new_course_syllabus_notice" style="display: none;">请先选择课程</span>
</li>
<div class="cl"></div>
<li class="mt10 ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_course_name)%>&nbsp;&nbsp;</label>
<input type="text" name="course[name]" id="new_course_name" class="courses_input w289" maxlength="100" placeholder="例如计算机系2016秋季A班" onkeyup="regex_course_name('new');">
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
<div class="cl"></div>
<span class="c_red ml80" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
</li>
<div class="cl"></div>
<li class="ml125 mb5 fontGrey3"><span class="success-icon mr25">正确示例计算机系2016秋季A班</span></li>

View File

@ -1,5 +1,5 @@
<p ondblclick=show_edit_file_description('<%= file.id %>')>
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE; cursor:pointer;" title="双击可编辑">双击添加描述</span><% else %><span style="cursor:pointer;" title="双击可编辑"><%= file.description %></span><% end %>
<%#= file.description.blank? ? "该资源暂无描述" : file.description %>
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_file_description("+file.id.to_s+");"%>
<p ondblclick=show_edit_file_description('<%= file.id %>')>
<span style="white-space:nowrap;">资源描述:</span><% if file.description.blank? %><span style="color:#C5C5BE; cursor:pointer;" title="双击可编辑">双击添加描述</span><% else %><span style="cursor:pointer;" title="双击可编辑" class="break_word"><%= file.description %></span><% end %>
<%#= file.description.blank? ? "该资源暂无描述" : file.description %>
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_file_description("+file.id.to_s+");"%>
</p>

View File

@ -1,164 +1,36 @@
<div class="myissues_head mb5">
<h2 class="ml15">issue统计</h2>
</div>
<div class="clear">
<div>
<!-- <ul>
<li>所有<a style="cursor: pointer;" onclick="showResultAll();" class="issues_greycirbg_btn "><%#= @issues_filter.count %></a></li>
<li>开启<a style="cursor: pointer;" onclick="showResultOpen();" class="issues_greycirbg_btn "><%#= @issue_open_count %></a></li>
<li>关闭<a style="cursor: pointer;" onclick="showResultClose();" class="issues_greycirbg_btn "><%#= @issue_close_count %></a></li>
</ul>-->
<ul class="new_roadmap_nav fl" >
<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' onclick='showResultAll();'>#{@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 id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2' onclick='showResultOpen();'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
</li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'onclick='showResultClose();'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
</ul>
</div><!--issues_statistics end-->
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr mt10" >新建</a>
</div>
<div id="result_all" class="">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[0] %></td>
<td class="w130"><%= v[2] %></td>
<td class="w130"><%= v[4] %></td>
<td class="w130"><%= v[1] %></td>
<td class="w130"><%= v[3] %></td>
<td class="w130"><%= v[5] %></td>
</tr>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @alltotal[0] %></td>
<td class="w130"><%= @alltotal[2] %></td>
<td class="w130"><%= @alltotal[4] %></td>
<td class="w130"><%= @alltotal[1] %></td>
<td class="w130"><%= @alltotal[3] %></td>
<td class="w130"><%= @alltotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<div class="myissues_head mb5">
<h2 class="ml15">issue统计</h2>
</div>
<div class="clear">
<div>
<ul class="new_roadmap_nav fl" >
<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" %>
</li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
</li>
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
</ul>
</div><!--issues_statistics end-->
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr mt10" >新建</a>
</div>
<div id="merge_record_1" class="">
<%= render "issues/statistics_all" %>
</div>
<div id="merge_record_2" class="undis">
<%= render "issues/statistics_open" %>
</div>
<div id="merge_record_3" class="undis">
<%= render "issues/statistics_lock" %>
</div>
<div id="result_open" style="display: none">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[6] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[6] %></td>
<td class="w130"><%= v[8] %></td>
<td class="w130"><%= v[10] %></td>
<td class="w130"><%= v[7] %></td>
<td class="w130"><%= v[9] %></td>
<td class="w130"><%= v[11] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @opentotal[0] %></td>
<td class="w130"><%= @opentotal[2] %></td>
<td class="w130"><%= @opentotal[4] %></td>
<td class="w130"><%= @opentotal[1] %></td>
<td class="w130"><%= @opentotal[3] %></td>
<td class="w130"><%= @opentotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<script>
<div id="result_close" style="display: none">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[12] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[12] %></td>
<td class="w130"><%= v[14] %></td>
<td class="w130"><%= v[16] %></td>
<td class="w130"><%= v[13] %></td>
<td class="w130"><%= v[15] %></td>
<td class="w130"><%= v[17] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @closetotal[0] %></td>
<td class="w130"><%= @closetotal[2] %></td>
<td class="w130"><%= @closetotal[4] %></td>
<td class="w130"><%= @closetotal[1] %></td>
<td class="w130"><%= @closetotal[3] %></td>
<td class="w130"><%= @closetotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<script>
function showResultAll(){
$("#result_all").show();
$("#result_open").hide();
$("#result_close").hide();
}
function showResultOpen(){
$("#result_all").hide();
$("#result_open").show();
$("#result_close").hide();
}
function showResultClose(){
$("#result_all").hide();
$("#result_open").hide();
$("#result_close").show();
}
//issues列表
// 导航选择效果
function g(o){
return document.getElementById(o);
}
@ -168,12 +40,12 @@
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
g('new_roadmap_content_'+i).className='undis';
g('merge_record_'+i).className='undis';
}
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
g('new_roadmap_content_'+n).className='dis';
g('merge_record_'+n).className='dis';
}
</script>
</script>

View File

@ -0,0 +1,35 @@
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[0] %></td>
<td class="w130"><%= v[2] %></td>
<td class="w130"><%= v[4] %></td>
<td class="w130"><%= v[1] %></td>
<td class="w130"><%= v[3] %></td>
<td class="w130"><%= v[5] %></td>
</tr>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @alltotal[0] %></td>
<td class="w130"><%= @alltotal[2] %></td>
<td class="w130"><%= @alltotal[4] %></td>
<td class="w130"><%= @alltotal[1] %></td>
<td class="w130"><%= @alltotal[3] %></td>
<td class="w130"><%= @alltotal[5] %></td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,37 @@
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[12] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[12] %></td>
<td class="w130"><%= v[14] %></td>
<td class="w130"><%= v[16] %></td>
<td class="w130"><%= v[13] %></td>
<td class="w130"><%= v[15] %></td>
<td class="w130"><%= v[17] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @closetotal[0] %></td>
<td class="w130"><%= @closetotal[2] %></td>
<td class="w130"><%= @closetotal[4] %></td>
<td class="w130"><%= @closetotal[1] %></td>
<td class="w130"><%= @closetotal[3] %></td>
<td class="w130"><%= @closetotal[5] %></td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,37 @@
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[6] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[6] %></td>
<td class="w130"><%= v[8] %></td>
<td class="w130"><%= v[10] %></td>
<td class="w130"><%= v[7] %></td>
<td class="w130"><%= v[9] %></td>
<td class="w130"><%= v[11] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @opentotal[0] %></td>
<td class="w130"><%= @opentotal[2] %></td>
<td class="w130"><%= @opentotal[4] %></td>
<td class="w130"><%= @opentotal[1] %></td>
<td class="w130"><%= @opentotal[3] %></td>
<td class="w130"><%= @opentotal[5] %></td>
</tr>
</tbody>
</table>

View File

@ -1,10 +1,17 @@
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
<div class="myissues_con mb10">
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
<p class="mb5">由<%= link_to @journal.user, user_path(@journal.user), :class => "c_blue" %> 更新于 <%= format_time @journal.created_on %></p>
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
<div class="mb10 fl">之前版本:</div><div class="fl"><%= @detail.old_value.html_safe %></div>
<div class="cl"></div>
<div class="fl"> 当前版本:</div><div class="fl"><%= @detail.value.html_safe %></div>
<div class="cl"></div>
<%#= @diff.to_html.gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").gsub("&amp;gt;", ">").gsub("&amp;lt;", "<").gsub("&amp;quot;", "\"").html_safe %>
</div>
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
<%= @diff.to_html.gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").gsub("&amp;gt;", ">").gsub("&amp;lt;", "<").gsub("&amp;quot;", "\"").html_safe %>
</div>
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>

View File

@ -8,18 +8,25 @@
<div class="pro_new_top clear mb10">
<div class="fl pro_new_name ml15 clear">
<% unless @project.is_public? %><span class="icons_newpro_lock fl"></span><% end %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username fl" %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_project_name fl" %>
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div>
<!--加入、退出、关注项目-->
<div class="fr clear mr15">
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
</div>
<div class="cl"></div>
<div class="pro_new_topnav mt15">
<% unless @project.forked_from_project_id.nil? %>
<div class="fl pro_new_name ml15 clear mt5">
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl" %>
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl" %>
</div>
<div class="cl"></div>
<% end %>
<div class="pro_new_topnav mt8">
<ul>
<li id="project_menu_01">
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
@ -79,6 +86,7 @@
</ul>
</div>
</div>
<!--新版项目头部结束-->
<script>
$(function(){

View File

@ -4,7 +4,7 @@
<li id="course_group_<%=group.id %>">
<% count = group.members.count %>
<a href="<%= group_member_course_path(course, :group_id => group.id) %>"><font class="hidden dis" style="max-width: 120px;"><%=group.name %></font><span style="vertical-align: top;"><%=count %></span></a>
<% if is_teacher %>
<% if User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
<%= link_to '', search_not_group_member_course_path(@course,:group_id => group.id),:remote => true, :class => "sy_class_add", :title => "添加成员" %>
<% end %>
</li>

View File

@ -17,7 +17,7 @@
<% memo = Memo.where(:id => 1168).first %>
<% unless memo.nil? %>
<li class="navHomepageMenu fl mr30">
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
<%= link_to "帮助中心", "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
</li>
<% end %>
<% else %>
@ -66,9 +66,11 @@
<li>
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
</li>
<li>
<%= link_to '我的课程',{:controller => "users", :action => "user_courselist", :id => User.current.id}, :class => "menuGrey" %>
</li>
<% if hidden_unproject_infos %>
<li>
<%= link_to '我的课程',{:controller => "users", :action => "user_courselist", :id => User.current.id}, :class => "menuGrey" %>
</li>
<% end %>
<li>
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
</li>

View File

@ -69,7 +69,7 @@
<li id="sy_02" class="sy_icons_boards">
<% count = course_board ? (course_board.topics.count + Message.where("board_id =? and parent_id is not ?", course_board.id, nil).count) : 0 %>
<a href="<%=course_boards_path(@course) %>">讨论区<span><%=count %></span></a>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if is_teacher %>
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
</li>
<div id="board_children_list">
<%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %>

View File

@ -1,36 +1,36 @@
<!-- get_praise_num(obj,1)函数中 1代表返回顶得次数 0返回踩的次数 -->
<% if User.current.logged? %>
<% if horizontal %>
<!-- 横排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right; " >
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<a href="javascript:void(0);" class="<%= obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% end %>
<% else %>
<% if user_id == obj.author_id %>
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% else %>
<!-- 积分少于2分不能踩帖 -->
<%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
<!--<%# else %>-->
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
<!--:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>-->
<!--<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%#= l(:label_issue_praise)%>" target="_blank"> <%#= get_praise_num(obj)%></a>-->
<!--<%# end %>-->
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<!-- get_praise_num(obj,1)函数中 1代表返回顶得次数 0返回踩的次数 -->
<% if User.current.logged? %>
<% if horizontal %>
<!-- 横排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right; " >
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<a href="javascript:void(0);" class="<%= obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% end %>
<% else %>
<% if user_id == obj.author_id %>
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
<% else %>
<!-- 积分少于2分不能踩帖 -->
<%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
<!--<%# else %>-->
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
<!--:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>-->
<!--<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%#= l(:label_issue_praise)%>" target="_blank"> <%#= get_praise_num(obj)%></a>-->
<!--<%# end %>-->
<% end %>
<% end %>
</div>
<% end %>
<% end %>

View File

@ -38,18 +38,18 @@
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
</div>
<div class="postThemeWrap">
<% if @memo.author.id == User.current.id%>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_memo_link" ></a></li>
<% if @memo.author.id == User.current.id || User.current.admin? %>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_memo_link" ></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<%end%>
<div class="postDetailTitle fl">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @memo.subject%></a>
@ -62,7 +62,7 @@
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
<div class="cl"></div>
<div class="homepagePostIntro memo-content" id="activity_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @memo.content.html_safe%>
<%= @memo.content.html_safe%>
</div>
<div class="cl"></div>
<div class=" fl" style="width: 600px">
@ -83,35 +83,46 @@
<div class="homepagePostReplyBannerTime"></div>
</div>
<div class="" id="reply_div_<%= @memo.id %>">
<% @replies.each_with_index do |reply,i| %>
<div class="homepagePostReplyContainer" >
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.show_name%></a><%= format_date(reply.created_at) %></div>
<div class="homepagePostReplyContent break_word" id="activity_description_<%= reply.id %>"><%= reply.content.gsub(/script/, "script&nbsp").html_safe %></div>
</div>
<script type="text/javascript">
$(function(){
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
postContent = postContent.gsub(/<script>*/, "<script>");
postContent = postContent.gsub(/<html>*/, "<html>");
$(this).html(postContent);
});
autoUrl('activity_description_<%= reply.id %>');
description_show_hide(<%= reply.id %>);
});
</script>
<div class="cl"></div>
<% @replies.each_with_index do |reply,i| %>
<div class="homepagePostReplyContainer" >
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.show_name%></a><%= format_date(reply.created_at) %></div>
<div class="homepagePostReplyContent break_word" style="margin-bottom:25px;" id="activity_description_<%= reply.id %>"><p><%= reply.content.gsub(/script/, "script&nbsp").html_safe %></p>
<% if @memo.author.id == User.current.id || User.current.admin? %>
<%= link_to "删除", forum_memo_path(@memo.forum, reply), :class => "fr undis", :method => "delete", :confirm => l(:text_are_you_sure), :id => "delete_memo_reply_#{reply.id}" %>
<% end %>
</div>
</div>
<script type="text/javascript">
$(function(){
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
postContent = postContent.gsub(/<script>*/, "<script>");
postContent = postContent.gsub(/<html>*/, "<html>");
$(this).html(postContent);
});
autoUrl('activity_description_<%= reply.id %>');
description_show_hide(<%= reply.id %>);
});
$(".homepagePostReplyDes").mouseover(function(){
$(this).find("a[id*='delete_memo_reply']").show();
}).mouseout(function(){
$(this).find("a[id*='delete_memo_reply']").hide();
});
</script>
<div class="cl"></div>
</div>
<% end %>
</div>
<% end %>
</div>
<div class="cl"></div>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @memo.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
@ -141,15 +152,15 @@
</div>
<script type="text/javascript">
$(function(){
$("#activity_description_<%= @memo.id %> p,#activity_description__<%= @memo.id %> span,#activity_description_<%= @memo.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
autoUrl('activity_description_<%= @memo.id %>');
description_show_hide(<%= @memo.id %>);
$("#activity_description_<%= @memo.id %> p,#activity_description__<%= @memo.id %> span,#activity_description_<%= @memo.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
autoUrl('activity_description_<%= @memo.id %>');
description_show_hide(<%= @memo.id %>);
});
</script>

View File

@ -46,12 +46,10 @@
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo"><span class="fontGrey3">指派给</span>&nbsp;&nbsp;
<% unless activity.assigned_to_id.nil? %>
<% if activity.try(:assigned_to) == ' ' %>
<%= link_to "未指派", "", :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:assigned_to).try(:realname) ? activity.try(:assigned_to).try(:realname) : activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %>
<% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %>
<a class="newsBlue mr15">未指派</a>
<% else %>
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %>
</div>
<div class="homepagePostDeadline fl">

View File

@ -3,7 +3,7 @@
<!--关注项目-->
<li class="mr5 fl">
<%= watcher_link_for_project(@project, User.current) %>
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'pro_new_topbtn fl' %>
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id},:id=>"fans_num", :class => 'pro_new_topbtn fl' %>
</li>
<!--加入项目-->
<li class="mr5 fl">
@ -12,7 +12,7 @@
<% else %>
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
<% end %>
<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
</li>
<% end %>
<% else %>
@ -24,7 +24,7 @@
<!--项目创建者不能退出项目-->
<% if User.current.id != @project.user_id %>
<%= exit_project_link(@project) %>
<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
<% end %>
<% end %>

View File

@ -1,5 +1,5 @@
<h2>项目简介
<% if User.current.member_of?(@project) %>
<span class="fr mr15" id="project_invite_code">邀请码:<span class="c_orange"><%= @project.invite_code %></span></span>
<span class="fr mr15" id="project_invite_code">邀请码:<span style="color: #333;"><%= @project.invite_code %></span></span>
<% end %>
</h2>

View File

@ -7,20 +7,17 @@
<% parents_rely = get_reply_parents parents_rely, comment %>
<% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>">
<% if length <= 3 %>
<% if length <= 2 %>
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent} %>
<% else %>
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<div>
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => parents_rely[length - 1]} %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 1]} %>
</div>
<div class="orig_cont_hide clearfix">
<div class="orig_cont_hide_issue clearfix">
<span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span>
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0]} %>
</div>

View File

@ -1,14 +1,8 @@
<% count = activity.journals.count %>
<div class="container-big-grey">
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
<% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>">
<%= render :partial => "projects/project_issue_expand_show", :locals => {:comments => comments, :activity => activity, :user_activity_id => user_activity_id} %>
</div>
<% end %>
<div class="" id="reply_div_<%= user_activity_id %>">
<%= render :partial => "projects/project_issue_expand_show", :locals => {:comments => comments, :activity => activity, :user_activity_id => user_activity_id} %>
</div>
</div>

View File

@ -1,5 +1,6 @@
<% @nav_dispaly_project_label = 1
@nav_dispaly_forum_label = 1 %>
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<%= error_messages_for 'project' %>
<div class="project_r_h02">
<h2 class="project_h2"><%= l(:label_project_new)%></h2>
@ -7,12 +8,12 @@
<div class="hwork_new">
<ul>
<%= labelled_form_for @project do |f| %>
<li class="ml45">
<li class="ml45 mb10">
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
<label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;</label>
<input type="text" name="project[name]" id="project_name" class="courses_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<span class="c_red" id="project_name_notice" style="display: none;">项目名称不能为空</span>
<label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label>
<input type="text" name="project[name]" id="project_name" class="project_new_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<p class="c_orange ml70" id="project_name_notice" style="display: none;">项目名称不能为空</p>
</li>
<div class="cl"></div>
<!-- <li class="ml45 mb10">
@ -21,9 +22,20 @@
<span class=" ml15 c_orange" id = "project_newtype_select"><%#= l(:label_type_des_development) %></span>
</li>
<div class="cl"></div>-->
<li class="ml45">
<label class="fl" >&nbsp;&nbsp;<%= l(:label_tags_project_description) %>&nbsp;&nbsp;</label>
<textarea name="project[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>
<li class="ml45 mb10">
<label class="fl mr5">&nbsp;&nbsp;<%= l(:label_tags_project_description) %>&nbsp;&nbsp;:</label>
<%= f.kindeditor :description, :editor_id => 'project_create_editor',
:owner_id => @project.nil? ? 0: @project.id,
:owner_type => OwnerTypeHelper::PROJECT,
:width => '86%',
:height => 300,
:minHeight=> 300,
:class => 'courses_text ml5 fl',
:input_html => { :id => 'description',
:class => 'courses_text fl',
:maxlength => 5000 }
%>
<!--<textarea name="project[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" ></textarea>-->
<div class="cl"></div>
</li>
<li>
@ -37,20 +49,12 @@
</em>
<% end %></p>
</li>
<li class=" mb5 ml80">
<label >公开&nbsp;&nbsp;</label>
<li class="mb5 ml70">
<label >&nbsp;公开&nbsp;</label>
<input id="project_is_public" name="project[is_public]" type="checkbox" value="1" checked="checked">
<span class="c_grey">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span>
<div class="cl"></div>
</li>
<li>
<p style="display:none;">
<%= f.text_field :project_type, :value => 0 %>
</p>
</li>
<li>
<%= render :partial => 'form_new', :locals => { :f => f } %>
</li>
<li class=" ml90" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a>
<%= link_to "取消",user_activities_path(User.current.id),:class => "grey_btn fl c_white ml10"%>
@ -85,6 +89,7 @@
//提交新建项目
function submit_new_project()
{
project_create_editor.sync();
if(regex_project_name())
{
$("#new_project").submit();

View File

@ -1,3 +1,6 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<div id="project_setting_hight">
<%= error_messages_for 'project' %>
<%= labelled_form_for @project do |f| %>
@ -13,13 +16,25 @@
<span class="c_red ml5 w690" id="project_name_notice" style="padding-left:100px;display: none;">项目名称不能为空!</span>
</li>
<li class="clear mb10">
<label class="label fl">&nbsp;项目描述&nbsp;&nbsp;:&nbsp;</label>
<textarea class="fl ml5 w690" style="height:192px; padding-top:5px;" id="project_description" name="project[description]" rows="8" placeholder="项目描述作为项目的简介,将始终显示在动态页的顶部&#13;&#10;最多3000个汉字或6000个英文字符)"><%= @project.description%></textarea>
<label class="label fl mr5">&nbsp;项目描述&nbsp;&nbsp;:&nbsp;</label>
<%= f.kindeditor :description, :editor_id => 'project_setting_editor',
:owner_id => @project.nil? ? 0: @project.id,
:owner_type => OwnerTypeHelper::PROJECT,
:width => '85%',
:height => 300,
:minHeight=> 300,
:class => 'fl ml5 w690',
:input_html => { :id => 'project_description',
:class => 'courses_text fl',
:maxlength => 5000 }
%>
<!--<textarea class="fl ml5 w690" style="height:192px; padding-top:5px;" id="project_description" name="project[description]" rows="8" placeholder="项目描述作为项目的简介,将始终显示在动态页的顶部&#13;&#10;最多3000个汉字或6000个英文字符)"><%= @project.description%></textarea>-->
</li>
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
<li class="clear">
<label class="fl">&nbsp;默认分支&nbsp;&nbsp;</label>
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "ml5" %>
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "ml5", :style => "height: 28px;" %>
</li>
<% end %>
<li class="clear">
@ -32,7 +47,7 @@
<input class="fl mt8" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
</li>
<li class="clear">
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.try(:roles).to_s.include?("Manager") %>
<%= link_to(l(:button_delete_project), { :controller => 'projects', :action => 'archive', :id => @project, :status => params[:status], :type =>"project" },
:data => {:confirm => l(:text_delete_project_are_you_sure)}, :method => :post, :class => "sy_btn_grey mr5 fl ml15") unless @project.archived? %>
<p class="fl c_grey">(友情提示:删除该项目后如果您想恢复该项目,请联系系统管理员!)</p>

View File

@ -2,7 +2,8 @@
<div class="pro_new_prompt ml15 mr15 mb10"><p><%= l(:milestone_no_data) %></p></div>
<% end %>
<div class=" sy_new_tchbox clear " >
<a href="javascript:void(0);" class=" sy_btn_green mb10" onclick="pro_st_show_ban1();">新建里程碑</a>
<a href="javascript:void(0);" class=" sy_btn_green mb10 fr" onclick="pro_st_show_ban1();">新建里程碑</a>
<div class="cl"></div>
<%= render :partial => 'projects/settings/new_versions_form', :locals => {:project => @project} %>
</div>

View File

@ -2,9 +2,9 @@
<div class="pro_new_info mb10">
<div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div>
<% if @project.description.blank? %>
<p class="break_word"><%= @project.name %><p>
<p class="break_word"><%= @project.name %></p>
<% else %>
<p class="break_word"><%= @project.description %><p>
<p class="break_word"><%=h @project.description.html_safe %></p>
<% end %>
</div>

View File

@ -25,16 +25,17 @@
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
</td>
<div id="children_tree">
<td class="tree-comments c_grey hidden">
<div class="hidden" id="changes_message_<%= tr_id %>">
<%#= (latest_changes.message) if latest_changes %>
</div>
</td>
<td class="tree-author c_grey">
<div class="hidden" id="changes_author_<%= tr_id %>">
<%#= (latest_changes.author_name) if latest_changes %>
</div>
</td>
<td class="tree-comments c_grey hidden">
<div class="hidden" id="changes_message_<%= tr_id %>">
<%#= (latest_changes.message) if latest_changes %>
</div>
</td>
<td class="tree-age c_grey">
<div class="hidden" id="changes_time_<%= tr_id %>">
<%# 为了转换UTC时间时差8小时 %>

View File

@ -53,12 +53,12 @@
<% if @changesets_latest_coimmit %>
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to get_user_by_mail(@changesets_latest_coimmit.author_email).show_name, user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span>
<% else %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=@changesets_latest_coimmit.author_email %></div>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%= @changesets_latest_coimmit.author_email %></div>
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span>
@ -69,7 +69,7 @@
</span>
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
</span>
</div>
<% end %>
@ -80,14 +80,15 @@
<% memo = Memo.where(:id => 1232).first %>
<% unless memo.nil? %>
<a href="<%= Setting.protocol + "://" %><%=Setting.host_name %>/forums/1/memos/1232" class="linkBlue2">如何提交代码</a>
<a href="<%= Setting.protocol + "://" %><%=Setting.host_name %>/forums/1/memos/1232" class="linkBlue2" target="_blank">如何提交代码</a>
<% end %>
<% unless @entries.blank? %>
<div class="fr">
<a style="color: #7f7f7f;">导出统计结果:</a>
<%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> <a style="color: #7f7f7f;">|</a>
<%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" } %>
<%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" }, :class => "linkBlue2" %> <a style="color: #7f7f7f;">|</a>
<%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" }, :class => "linkBlue2" %>
</div>
<div class="cl"></div>
<% end %>
<%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %>
<!--<a href="<%#=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>-->

View File

@ -1,4 +1,4 @@
<div class="fl" style="padding-bottom:10px; width:720px;">
<div class="fl pr" style="padding-bottom:10px; width:720px;">
<span class="c_dark f14 fb fl mr15">
作品
<font class="f12 c_red">
@ -31,7 +31,20 @@
<%= link_to "代码查重", work_canrepeat_student_work_index_path(homework:@homework.id, course_id:@course.id), class: 'BlueCirBtn fl',:remote => true %>
<% end %>
<% end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" onclick="show_or_hide_info();" style="display: none">[ 显示作业信息 ]</a> </span>
<%# if @homework.homework_type == 3 && my_work && my_work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") %>
<!--<div class="mt5 fr">-->
<!--<a href="javascript:void(0);" class="memberBtn fl mt3 mr15" title="添加小组成员" onclick="add_or_delete_group_member();">合作成员</a>-->
<!--</div>-->
<%# end %>
<% if @is_teacher && @homework.homework_type == 3 %>
<div class="group_work_tip_box fontGrey2">
<em></em>
<span></span>
<p class="mt5 mb5 break_word">大作品评分即组长的评分<br/>
请先完成大作品评分,系统将把大作品<br/>评分做为每个组员的初始分值,您需<br/>要在此基础上对组员评分进行手动调整
</p>
</div>
<% end %>
</div>
<div class="cl"></div>
@ -96,4 +109,8 @@
<% end %>
});
function add_or_delete_group_member() {
var html_value = "<%#= escape_javascript(render :partial => 'student_work/add_or_delete_member',:locals => {:homework=>@homework,:edit_mode => true}) %>";
pop_up_box(html_value, 528);
}
</script>

View File

@ -6,8 +6,9 @@
<%= labelled_form_for @syllabus do |f| %>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;课程名称&nbsp;&nbsp;</label>
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:软件工程" maxlength="100" onkeyup="regex_syllabus_name();">
<span class="c_red" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:软件工程" maxlength="100" onkeyup="regex_syllabus_name();">
<div class="cl"></div>
<span class="c_red ml80" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
</li>
<div class="cl"></div>
<li class="ml125 fontGrey3"><span class="success-icon mr25">正确示例:软件工程</span><span class="error-icon">错误示例2016软件工程</span></li>

View File

@ -59,12 +59,10 @@
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo"><span class="fontGrey3">指派给</span>&nbsp;&nbsp;
<% unless activity.assigned_to_id.nil? %>
<% if activity.try(:assigned_to).try(:realname) == ' ' %>
<%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %>
<% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %>
<a class="newsBlue mr15">未指派</a>
<% else %>
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %>
</div>
<div class="homepagePostDeadline fl">

View File

@ -12,13 +12,13 @@
<%#= labelled_form_for @version, :html => {:id => "popub_new_project_version_form", :remote => true, :is_setting => true, :is_index => params[:is_index] } do |f| %>
<ul class="pro_newsetting_con mb15 ">
<li class="mb10 clear">
<label class=" fl"><span class="c_red f12">*</span>&nbsp;名称&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;", :id => "popub_setting_version_name", :no_label => true %>
<label><span class="c_red f12">*</span>&nbsp;名称&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :name, :maxlength => 60, :class=>"w650", :style=>"height: 28px;", :id => "popub_setting_version_name", :no_label => true %>
<p class="c_orange ml100" style="display: none" id="pupub_project_setting_version_title">标题不能为空</p>
</li>
<li class="mb10 clear">
<label class=" fl">&nbsp;描述&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;", :no_label => true %>
<label>&nbsp;描述&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :description, :maxlength => 60, :class=>"w650", :style=>"height:28px;", :no_label => true %>
</li>
<!--<li class="mb10 clear">-->
<!--<label class=" fl">&nbsp;结束日期&nbsp;&nbsp;:&nbsp;</label>-->
@ -28,7 +28,7 @@
<!--&lt;!&ndash;<a href="" class="issues_data_img fl"></a>&ndash;&gt;-->
<!--</li>-->
<li class="mb10 clear">
<label class=" fl">&nbsp;状态&nbsp;&nbsp;:&nbsp;</label>
<label>&nbsp;状态&nbsp;&nbsp;:&nbsp;</label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{:no_label => true },{:style=>"height:28px;"} %>
</li>
</ul>

View File

@ -0,0 +1,7 @@
<% if @project %>
$('#fans_num').html('<%= @project.watcher_users.count %>');
// $('#project-'+'<%=@project.id%>'+'-watcher').html('添加关注');
$('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>");
<% else %>
$('#fans_num').html('<%= j(@user.watcher_users.count) %>');
<% end %>

View File

@ -1 +1,7 @@
$('#fans_num').html('<%= j(@user.watcher_users.count) %>')
<% if @project %>
$('#fans_num').html('<%= @project.watcher_users.count %>');
// $('#project-'+'<%=@project.id%>'+'-watcher').html('取消关注');
$('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>");
<% else %>
$('#fans_num').html('<%= j(@user.watcher_users.count) %>');
<% end %>

View File

@ -202,8 +202,17 @@ zh:
label_issue_new: 新建问题
label_query: 自定义查询
label_issue_list_xls: Issue列表
label_per_week: 每周
label_per_month: 每月
label_per_all: 所有
label_rep_xls: 版本库代码统计
label_user_rep_xls: 用户开发量统计
label_rep_branch: 分支
label_rep_user_id: 用户ID
label_rep_user_name: 用户名
label_rep_project_id: 项目ID
label_rep_project_name: 项目名
label_rep_admin_export_tip: 导出可能会持续很长一段时间,建议在平台空闲时间导出,你确定导出吗?
# Issue列表 excel导出参数
issue_xls_id: ID

View File

@ -1107,6 +1107,7 @@ RedmineApp::Application.routes.draw do
match 'admin', :to => 'admin#index', :via => :get
match 'admin/projects', :via => :get
match 'admin/export_rep_static_users', :via => :get
get 'admin/courses', as: :all_courses
get 'admin/syllabuses', as: :all_syllabuses
get 'admin/non_syllabus_courses', as: :non_syllabus_courses

View File

@ -325,16 +325,14 @@ ActiveRecord::Schema.define(:version => 20161028053000) do
add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
create_table "changesets", :force => true do |t|
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.string "committer"
t.datetime "committed_on", :null => false
t.datetime "committed_on", :null => false
t.text "comments"
t.date "commit_date"
t.string "scmid"
t.integer "user_id"
t.integer "project_id"
t.integer "type", :default => 0
end
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
@ -995,10 +993,6 @@ ActiveRecord::Schema.define(:version => 20161028053000) do
t.datetime "updated_at", :null => false
end
create_table "innodb_monitor", :id => false, :force => true do |t|
t.integer "a"
end
create_table "invite_lists", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@ -1462,9 +1456,11 @@ ActiveRecord::Schema.define(:version => 20161028053000) do
t.integer "question_type"
t.integer "is_necessary"
t.integer "poll_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "question_number"
t.integer "max_choices", :default => 0
t.integer "min_choices", :default => 0
end
create_table "poll_users", :force => true do |t|

View File

@ -132,6 +132,22 @@ class Gitlab::Client
end
alias_method :repo_rep_stats, :rep_stats
# static all users
def admin_rep_stats_week(project, options={})
get("/projects/#{project}/repository/admin_rep_stats_week", :query => options)
end
alias_method :repo_rep_stats, :rep_stats
def admin_rep_stats_month(project, options={})
get("/projects/#{project}/repository/admin_rep_stats_month", :query => options)
end
alias_method :repo_rep_stats, :rep_stats
def admin_rep_stats_all(project, options={})
get("/projects/#{project}/repository/admin_rep_stats_all", :query => options)
end
alias_method :repo_rep_stats, :rep_stats
# Gets a tree activities of project repository.
#
# @example

View File

@ -126,11 +126,11 @@ Redmine::AccessControl.map do |map|
map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true,:belong_to_course => true
end
map.course_module :news do |map|
# map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
map.course_module :news do |map|
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
map.permission :view_course_news, {:news => [:index, :show]}, :public => true, :read => true
# map.permission :comment_news, {:comments => :create}
end
map.permission :comment_news, {:comments => :create}
end
map.course_module :bids do |map|
map.permission :view_homework_attaches, {:bids => [:show, :show_project, :revision]}, :read => true,:belong_to_course => true
@ -195,11 +195,11 @@ Redmine::AccessControl.map do |map|
# map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
# end
map.project_module :news do |map|
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
map.permission :comment_news, {:comments => [:create, :reply]}
end
# map.project_module :news do |map|
# map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
# map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
# map.permission :comment_news, {:comments => [:create, :reply]}
# end
map.contest_module :contestnotifications do |map|
map.permission :manage_contestnotifications, {:contestnotifications => [:new, :create, :edit, :update, :destroy], :notificationcomments => [:destroy]}, :require => :member,:belong_to_contest => true
@ -219,17 +219,17 @@ Redmine::AccessControl.map do |map|
map.permission :view_files, {:files => :index, :versions => :download}, :read => true
end
map.project_module :wiki do |map|
map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member
map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true
map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment]
map.permission :delete_wiki_pages_attachments, {}
map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
end
# map.project_module :wiki do |map|
# map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
# map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
# map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member
# map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
# map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
# map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true
# map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment]
# map.permission :delete_wiki_pages_attachments, {}
# map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
# end
map.project_module :repository do |map|
map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member

View File

@ -189,11 +189,14 @@ function regex_syllabus_option(str) {
var obj = document.getElementById(str + "_syllabus_id");
var syllabus = obj.options[obj.selectedIndex];
if(parseInt(syllabus.value) == 0) {
$("#"+str+"_course_syllabus_notice").show();
return false;
} else{
$("#"+str+"_course_syllabus_notice").hide();
return true;
}
} else {
$("#"+str+"_course_syllabus_notice").hide();
return true;
}
}

View File

@ -358,6 +358,7 @@ function regex_project_name() {
//配置-信息提交
function submit_edit_project(id) {
project_setting_editor.sync();
if (regex_project_name()) {
$("#edit_project_" + id).submit();
}

View File

@ -186,6 +186,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mt1{margin-top: 1px;}
.mt2{ margin-top:2px;}
.mt3{ margin-top:3px;}
.mt4{ margin-top:4px;}
.mt5{ margin-top:5px;}
.mt6{ margin-top:6px;}
.mt7 {margin-top:7px;}

View File

@ -581,3 +581,8 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.ye_tips_box_inner{ position: absolute;line-height: 1.5;padding: 5px 10px; white-space: nowrap; background-color: #FFFEF4; left:30px; top: -5px; border: solid 1px #F3DDB3;}
.ye_tips_box_inner span { display: block; border-width: 10px;position: absolute;top: 15px; left: -18px; border-style: dashed solid dashed dashed;border-color: transparent #FFFEF4 transparent transparent;font-size: 0;line-height: 0;}
.ye_tips_box_inner em { display: block; border-width: 10px;position: absolute;top: 42px; left: -20px; border-style: dashed solid dashed dashed;border-color: transparent #F3DDB3 transparent transparent;font-size: 0;line-height: 0;}
/*分组作业评分提示框*/
.group_work_tip_box {width:200px; position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-255px; top:-10px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.group_work_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.group_work_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}

View File

@ -160,9 +160,9 @@ div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}
.repos_files ul:hover{ background:#ffffdd;}
.repos_t_c li{ text-align:center;}
.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;}
.tree-age{width:15%; text-align:right;}
.tree-author{width:10%; text-align:left;}
.tree-comments{width:35%; text-align:left;}
.tree-age{width:10%; text-align:right;}
.tree-author{width:15%; text-align:left;}
.tree-comments{width:55%; text-align:left;}
/* 里程碑 */
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
@ -368,7 +368,7 @@ div.changeset { border-bottom: 1px solid #ddd; }
tr.entry { border: 1px solid #DDD; }
tr.entry td { white-space: nowrap; }
tr.entry td.filename { width: 30%; }
tr.entry td.filename_no_report { width: 40%; }
tr.entry td.filename_no_report { width: 20%; }
tr.entry td.size { text-align: right; font-size: 90%; }
tr.entry td.revision, tr.entry td.author { text-align: center; }
tr.entry td.age { text-align: right; }
@ -780,7 +780,7 @@ a:hover.issues_list_title{color:#3b94d6;}
/* 搜索 与课程相同 */
.hw_search_box{ position:relative; }
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;}
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;}
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;}
.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
@ -855,8 +855,8 @@ input.pro_newissue_con_check{ width: 15px; height: 15px;}
.pro_new_top {padding-top:15px; border:1px solid #ddd; background-color:#fff; width: 998px;}
.icons_newpro_lock{width: 22px; height: 23px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -113px no-repeat;}
.pro_new_name{width: 600px; }
.pro_new_name a { font-size: 24px; color: #3b94d6; line-height: 24px;}
.pro_new_name a:hover{ color: #2783c7;}
a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px; cursor: default;}
a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px; cursor: default;}
a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
a.pro_new_topbtn{ padding: 3px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;}
@ -882,7 +882,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
/*项目简介*/
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
.pro_new_info h2{ background: #eee; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px;}
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
.pro_new_info p{ padding:15px; color: #666;}
.pro_new_info_weight{ font-size: 16px; font-weight: bold;}
/* 新版项目配置*/
@ -944,7 +944,7 @@ p.pro_new_grey{ line-height: 1.9; }
.undis {display:none;}
.dis {display:block;}
.new_roadmap_listbox{ padding:15px;border-bottom:1px solid #dbdbdb;}
.new_roadmap_listtitle a{ color: #333;display:block;max-width:840px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.new_roadmap_listtitle a{ color: #333;display:block;max-width:800px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
.new_roadmap_listtitle a:hover{ color:#3498db;}
.new_roadmap_list_txt{ color: #666;}
.new_roadmap_list_txt li{ float: left; margin-right: 10px;}

View File

@ -1398,7 +1398,8 @@ a:hover.comment_ding_link{ color:#269ac9;}
.orig_textarea{width:90%; margin-bottom:10px;}
.orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
.orig_sub:hover{ background:#297fb8;}
.orig_cont_hide{ text-align:center; width:624px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;}
.orig_cont_hide{ text-align:center; width:632px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;}
.orig_cont_hide_issue{ text-align:center; width:882px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;}
.orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}
.relateText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight: bold;}
@ -1522,3 +1523,5 @@ a.syllabusbox_a_blue{
/*模拟title*/
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
/*项目创建*/
.project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}

View File

@ -206,7 +206,7 @@
table.list th, table.list td {border: 1px solid #aaa;}
}
.cloneUrl {width:235px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.cloneUrl {width:350px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.cloneUrl2 {width:328px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;}
.vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);}
@ -215,12 +215,12 @@
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
.mt1 {margin-top:1px;}
.mt2 {margin-top:2px;}
.commit_content_dec{width: 400px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
.commit_content_dec{width: 500px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
/*提交信息列表*/
.col-md-10 {
@ -246,7 +246,7 @@ li.commit .commit-row-title {
margin-bottom: 2px;
}
li.commit .commit-row-title .str-truncated {
max-width: 70%;
max-width: 82%;
}
.str-truncated {
display: inline-block;