Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
4448fdfaca
|
@ -0,0 +1,11 @@
|
|||
app\models\setting.rb :165
|
||||
# fixed domain url in development. tantantan's bug
|
||||
if Rails.env.development?
|
||||
methods.map do |m|
|
||||
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||
end
|
||||
end
|
||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||
为了开发方便,使之功能在development模式下失效。
|
||||
# => nyan
|
||||
================================================================================
|
|
@ -26,14 +26,15 @@ class FilesController < ApplicationController
|
|||
include SortHelper
|
||||
|
||||
def index
|
||||
sort_init 'filename', 'asc'
|
||||
sort_update 'filename' => "#{Attachment.table_name}.filename",
|
||||
'created_on' => "#{Attachment.table_name}.created_on",
|
||||
'size' => "#{Attachment.table_name}.filesize",
|
||||
'downloads' => "#{Attachment.table_name}.downloads"
|
||||
#sort_init 'filename', 'asc'
|
||||
sort_init 'created_on', 'desc'
|
||||
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||
'filename' => "#{Attachment.table_name}.filename",
|
||||
'size' => "#{Attachment.table_name}.filesize",
|
||||
'downloads' => "#{Attachment.table_name}.downloads"
|
||||
|
||||
@containers = [ Project.includes(:attachments).reorder(sort_clause).find(@project.id)]
|
||||
@containers += @project.versions.includes(:attachments).reorder(sort_clause).all.sort.reverse
|
||||
@containers = [ Project.includes(:attachments).reorder("attachments.created_on DESC").find(@project.id)] #modify by Long Jun
|
||||
@containers += @project.versions.includes(:attachments).reorder("created_on DESC").all.sort
|
||||
|
||||
if @project.project_type == 1
|
||||
render :layout => 'base_courses'
|
||||
|
|
|
@ -160,7 +160,8 @@ class IssuesController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
render_attachment_warning_if_needed(@issue)
|
||||
flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
|
||||
flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.source_from}", issue_path(@issue), :title => @issue.subject))
|
||||
#flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
|
||||
if params[:continue]
|
||||
attrs = {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?}
|
||||
redirect_to new_project_issue_path(@issue.project, :issue => attrs)
|
||||
|
|
|
@ -87,6 +87,7 @@ class MemosController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @memo }
|
||||
format.xml { render xml: @memo }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
# menu_item l(:label_homework), :only => :homework
|
||||
# menu_item l(:label_course_feedback), :only => :feedback
|
||||
menu_item :homework, :only => :homework
|
||||
menu_item :homework, :only => [:homework, :new_homework]
|
||||
menu_item :feedback, :only => :feedback
|
||||
menu_item l(:label_course_file), :only => :index
|
||||
menu_item l(:label_course_news), :only => :index
|
||||
|
@ -296,10 +296,17 @@ class ProjectsController < ApplicationController
|
|||
#Ended by young
|
||||
|
||||
def feedback
|
||||
page = params[:page]
|
||||
# Find the page of the requested reply
|
||||
@jours = @project.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||
@limit = 10
|
||||
if params[:r] && page.nil?
|
||||
offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i])
|
||||
page = 1 + offset / @limit
|
||||
end
|
||||
|
||||
@feedback_count = @jours.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, page
|
||||
@offset ||= @feedback_pages.offset
|
||||
@jour = @jours[@offset, @limit]
|
||||
@state = false
|
||||
|
@ -632,7 +639,7 @@ class ProjectsController < ApplicationController
|
|||
## 有角色参数的才是课程,没有的就是项目
|
||||
@render_file = 'member_list'
|
||||
# 判断是否课程
|
||||
if @project.project_type == 1
|
||||
if @project.project_type == Project::ProjectType_course
|
||||
case params[:role]
|
||||
when '1'
|
||||
@subPage_title = l :label_teacher_list
|
||||
|
@ -644,7 +651,7 @@ class ProjectsController < ApplicationController
|
|||
@subPage_title = ''
|
||||
@members = @project.member_principals.includes(:roles, :principal).all.sort
|
||||
end
|
||||
else
|
||||
else # @project.project_type == Project::ProjectType_project
|
||||
roles = Role.find_all_givable
|
||||
@subPage_title = l :label_member_list
|
||||
@members = @project.member_principals.includes(:roles, :principal).all
|
||||
|
@ -656,7 +663,10 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def sort_project_members project, members
|
||||
#userGrade = UserGrade.where(:project_id => project.id)
|
||||
users = UserGrade.where(:project_id => project.id).order('grade DESC').joins("LEFT JOIN users ON users.id = user_grades.id")
|
||||
users = UserGrade.where(:project_id => project.id).
|
||||
order('grade DESC').
|
||||
joins("LEFT JOIN users ON users.id = user_grades.id").
|
||||
select("DISTINCT user_grades.user_id")
|
||||
memberlist = []
|
||||
users.each do |user|
|
||||
members.each do |member|
|
||||
|
@ -840,7 +850,8 @@ class ProjectsController < ApplicationController
|
|||
def select_project_layout
|
||||
project = Project.find_by_id(params[:id])
|
||||
project ||= @project
|
||||
(project.project_type == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
|
||||
project ||= @course
|
||||
(project.try(:project_type) == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
|
||||
end
|
||||
|
||||
# Validates parent_id param according to user's permissions
|
||||
|
|
|
@ -21,6 +21,9 @@ class TagsController < ApplicationController
|
|||
# $related_tags = Array.new
|
||||
NUMBERS = Setting.tags_show_search_results
|
||||
|
||||
# 预设几个可以添加的tag
|
||||
@preTags = %w|预设A 预设B 预设C 预设D 预设E 预设F |
|
||||
|
||||
# 接收参数解释:
|
||||
# params[:q]这是在其他页面点击tag,跳转到该页面后的结果显示 ;params[:selected_tags],这是在过滤页面增删tag进行过滤传过来的参数
|
||||
# 最后是2个过滤何种数据,显示结果的控制参数params[:obj_id],params[:object_falg]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
class WelcomeController < ApplicationController
|
||||
caches_action :robots
|
||||
before_filter :entry_select, :only => [:index]
|
||||
before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index]
|
||||
|
||||
def index
|
||||
# @news = News.latest User.current
|
||||
|
@ -80,11 +80,55 @@ class WelcomeController < ApplicationController
|
|||
@student = User.student
|
||||
end
|
||||
|
||||
def contest
|
||||
|
||||
end
|
||||
|
||||
def search
|
||||
search_condition = params[:q]
|
||||
search_type = params[:search_type].to_sym unless search_condition.blank?
|
||||
|
||||
respond_to do |format|
|
||||
format.html{
|
||||
case search_type
|
||||
when :projects
|
||||
redirect_to projects_search_path(:name => search_condition,
|
||||
:project_type => Project::ProjectType_project)
|
||||
when :courses
|
||||
redirect_to projects_search_path(:name => search_condition,
|
||||
:project_type => Project::ProjectType_course)
|
||||
when :users
|
||||
redirect_to users_search_path(:name => search_condition)
|
||||
when :users_teacher
|
||||
redirect_to users_search_path(:name => search_condition, :role => :teacher)
|
||||
when :users_student
|
||||
redirect_to users_search_path(:name => search_condition, :role => :student)
|
||||
else
|
||||
redirect_to home_path, :alert => l(:label_sumbit_empty)
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
|
||||
def entry_select
|
||||
def entry_select_course
|
||||
(course() and render :course and return 0) if request.original_url.match(/course\.trustie\.net/)
|
||||
end
|
||||
|
||||
def entry_select_contest
|
||||
if request.original_url.match(/contest\.trustie\.net/)
|
||||
contest
|
||||
render :contest, layout: false
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
def entry_select_user
|
||||
if request.original_url.match(/user\.trustie\.net/)
|
||||
redirect_to(:controller => "users", :action => "index")
|
||||
return 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,13 +36,11 @@ module ApplicationHelper
|
|||
|
||||
#Added by young
|
||||
#Define the course menu's link class
|
||||
# 不是数组的转化成数组,然后判断当前menu_item是否在给定的列表
|
||||
# REVIEW: 目测menu的机制,貌似不是很需要转换,再说
|
||||
def link_class(label)
|
||||
if current_menu_item == label
|
||||
@class = 'selected'
|
||||
else
|
||||
@class = ''
|
||||
end
|
||||
return @class
|
||||
labels = label.is_a?(Array) ? label : ([] << label)
|
||||
labels.include?(current_menu_item) ? 'selected' : ''
|
||||
end
|
||||
#Ended by young
|
||||
# Return true if user is authorized for controller/action, otherwise false
|
||||
|
@ -65,7 +63,7 @@ module ApplicationHelper
|
|||
if user.is_a?(User)
|
||||
name = h(user.name(options[:format]))
|
||||
if user.active? || (User.current.admin? && user.logged?)
|
||||
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.forge_domain}, :class => user.css_classes
|
||||
link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => user.css_classes
|
||||
else
|
||||
name
|
||||
end
|
||||
|
@ -1479,16 +1477,7 @@ module ApplicationHelper
|
|||
user.watcher_users.count
|
||||
end
|
||||
#end
|
||||
#author : nyan
|
||||
def stringCut240(str)
|
||||
(str.length > 240) ? (str[0,240]<<"......") : str
|
||||
end
|
||||
#author : xianbo
|
||||
def objCut12(obj)
|
||||
for obj1 in obj[0..11]
|
||||
obj2 = obj1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def hadcommittedhomework(cur,curb)
|
||||
@attaches=HomeworkAttach.find_by_sql("select * from homework_attaches where(bid_id = #{curb})")
|
||||
|
@ -1501,29 +1490,35 @@ module ApplicationHelper
|
|||
|
||||
def render_dynamic_nav
|
||||
home_link = link_to l(:field_homepage), {:controller => 'welcome', :action => 'index'}
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher'}
|
||||
courses_link = link_to l(:label_course_practice), {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0}
|
||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index'}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1 }
|
||||
main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_domain}
|
||||
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
|
||||
|
||||
course_all_course_link = link_to l(:label_course_all), {:controller => 'projects', :action => 'course', :project_type => 1, :host => Setting.course_domain}
|
||||
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain}
|
||||
courses_link = link_to l(:label_course_practice), {:controller => 'projects', :action => 'course', :project_type => 1, :host => Setting.course_domain}
|
||||
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}
|
||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain}
|
||||
contest_link = link_to l(:label_contest_innovate), {:controller => 'bids', :action => 'contest', :project_type => 1 , :host => Setting.contest_domain}
|
||||
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
|
||||
forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"}
|
||||
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'}
|
||||
|
||||
#@nav_dispaly_project_label
|
||||
nav_list = Array.new
|
||||
nav_list.push(home_link)
|
||||
nav_list.push(home_link) if !@nav_dispaly_home_path_label
|
||||
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label
|
||||
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label
|
||||
|
||||
nav_list.push(main_project_link) if @nav_dispaly_main_project_label
|
||||
nav_list.push(main_course_link) if @nav_dispaly_main_course_label
|
||||
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label
|
||||
nav_list.push(projects_link) if @nav_dispaly_project_label
|
||||
nav_list.push(users_link) if @nav_dispaly_user_label
|
||||
nav_list.push(contest_link) if @nav_dispaly_contest_label
|
||||
nav_list.push(bids_link) if @nav_dispaly_bid_label
|
||||
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
||||
nav_list.push(stores_link) if !@nav_dispaly_course_all_label
|
||||
nav_list.push(stores_link) if @nav_dispaly_store_all_label
|
||||
|
||||
content_li = ''
|
||||
nav_list.collect do |nav_item|
|
||||
|
|
|
@ -9,9 +9,14 @@ module CoursesHelper
|
|||
=end
|
||||
TeacherRoles = [3, 4, 7, 9]
|
||||
StudentRoles = [5, 10]
|
||||
|
||||
AllPeople = StudentRoles+TeacherRoles
|
||||
## return people count
|
||||
|
||||
# 返回x项目成员数量,即roles表中定义的所有成员
|
||||
def projectCount project
|
||||
searchCountByRoles project, AllPeople
|
||||
end
|
||||
|
||||
# 返回教师数量,即roles表中定义的Manager
|
||||
def teacherCount project
|
||||
searchCountByRoles project, TeacherRoles
|
||||
|
|
|
@ -58,7 +58,8 @@ module IssuesHelper
|
|||
end
|
||||
|
||||
def issue_heading(issue)
|
||||
h("#{issue.tracker} ##{issue.id}")
|
||||
#h("#{issue.tracker} ##{issue.id}")
|
||||
h("#{issue.tracker} #{issue.source_from}")
|
||||
end
|
||||
|
||||
def render_issue_subject_with_tree(issue)
|
||||
|
|
|
@ -25,7 +25,7 @@ module JournalsHelper
|
|||
links = []
|
||||
if !journal.notes.blank?
|
||||
links << link_to(l(:button_quote),
|
||||
{:controller => 'journals', :action => 'new', :id => issue, :journal_id => journal},
|
||||
{:controller => 'journals', :action => 'new', :id => issue.id, :journal_id => journal},
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote)) if options[:reply_links]
|
||||
|
|
|
@ -258,6 +258,22 @@ module ProjectsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def rolesToLanguage rolesArray
|
||||
rolesArray = ([] << rolesArray) unless rolesArray.is_a?(Array)
|
||||
rolesArray.map{ |roleName|
|
||||
case roleName.to_sym
|
||||
when :Manager
|
||||
l :default_role_manager
|
||||
when :Developer
|
||||
l :default_role_developer
|
||||
when :Reporter
|
||||
l :default_role_reporter
|
||||
else
|
||||
'Unkown'
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def sort_project_by_hot
|
||||
return sort_project_by_hot_rails
|
||||
@projects_status = ProjectStatus.visible.where("project_statuses.project_type <> ? or project_statuses.project_type is null", 1)
|
||||
|
@ -286,6 +302,7 @@ module ProjectsHelper
|
|||
WHERE project_type = 0 ORDER BY grade DESC LIMIT #{limit} ) AS t ON p.id = t.project_id ")
|
||||
end
|
||||
|
||||
|
||||
# 判断课程是否结束,快别用,这个定日子的方法有问题
|
||||
def course_timeout? project
|
||||
return true if (project.nil? && project.course_extra.nil?)
|
||||
|
|
|
@ -39,6 +39,13 @@ module WelcomeHelper
|
|||
end
|
||||
end
|
||||
|
||||
def get_project_avatar project
|
||||
if get_avatar?(project)
|
||||
url_to_avatar(project)
|
||||
else
|
||||
'../images/avatars/Project/0'
|
||||
end
|
||||
end
|
||||
# 前略·天国の首页君/Earth has been unable stop to welcomePage's.
|
||||
# sum - 要搜索的项目数量
|
||||
# max_rate - 新项目所占所有项目的比重,10分制
|
||||
|
@ -50,17 +57,34 @@ module WelcomeHelper
|
|||
#
|
||||
# Returns project&courses array
|
||||
def find_miracle_course(sum=10, max_rate=7)
|
||||
Project.active.visible.course_entities.
|
||||
joins(:course_extra).
|
||||
joins(:memberships).
|
||||
group('members.project_id').
|
||||
reorder("courses.time DESC, COUNT(members.project_id) DESC").take sum
|
||||
# max = sum*(max_rate.to_f/10)
|
||||
# c1 = find_new_course(sum).to_a.dup
|
||||
# c2 = find_all_hot_course(sum).to_a.dup
|
||||
# c2 = c2 - c1
|
||||
# (c1.take(max)+c2).take(sum)
|
||||
end
|
||||
|
||||
def find_miracle_project(sum, max_rate)
|
||||
max = sum*(max_rate.to_f/10)
|
||||
c1 = find_new_course(sum).to_a.dup
|
||||
c2 = find_all_hot_course(sum).to_a.dup
|
||||
c2 = c2 - c1
|
||||
(c1.take(max)+c2).take(sum)
|
||||
c1 = find_new_project(sum).to_a.dup
|
||||
c2 = find_all_hot_project(sum).to_a.dup
|
||||
(c2.take(sum-max)+c1.take(max)).take(sum)
|
||||
end
|
||||
|
||||
def find_new_course limit=15
|
||||
Project.visible.joins(:course_extra).where("#{Project.table_name}.project_type = ? ", 1).order("courses.time DESC, #{Project.table_name}.created_on DESC").limit(limit).all
|
||||
end
|
||||
|
||||
def find_new_project limit=15
|
||||
Project.visible.where("#{Project.table_name}.project_type = ? ", 0).order("#{Project.table_name}.updated_on DESC, #{Project.table_name}.created_on DESC").limit(limit).all
|
||||
end
|
||||
|
||||
|
||||
def find_all_hot_project limit=15
|
||||
sort_project_by_hot limit
|
||||
end
|
||||
|
@ -214,7 +238,7 @@ module WelcomeHelper
|
|||
"show_news" => true,
|
||||
"show_bids" => true
|
||||
}
|
||||
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
|
||||
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
|
||||
activity.events_welcome(nil, nil, {:limit => limit, :types => 'welcome'})
|
||||
end
|
||||
|
||||
|
|
|
@ -56,8 +56,11 @@ class Issue < ActiveRecord::Base
|
|||
:include => [:project, :visible_journals],
|
||||
# sort by id so that limited eager loading doesn't break with postgresql
|
||||
:order_column => "#{table_name}.id"
|
||||
acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"},
|
||||
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}},
|
||||
acts_as_event :title => Proc.new {|o|
|
||||
#"#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"
|
||||
"#{o.tracker.name} #{o.source_from} (#{o.status}): #{o.subject}"
|
||||
},
|
||||
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o}},
|
||||
:type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
|
||||
|
||||
acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]},
|
||||
|
@ -212,9 +215,14 @@ class Issue < ActiveRecord::Base
|
|||
@workflow_rule_by_attribute = nil
|
||||
@assignable_versions = nil
|
||||
@relations = nil
|
||||
@to_param = nil
|
||||
base_reload(*args)
|
||||
end
|
||||
|
||||
def to_param
|
||||
@to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
|
||||
end
|
||||
|
||||
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
|
||||
def available_custom_fields
|
||||
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : []
|
||||
|
@ -1139,6 +1147,12 @@ class Issue < ActiveRecord::Base
|
|||
Project.all(:conditions => Project.allowed_to_condition(user, :move_issues))
|
||||
end
|
||||
|
||||
# back string obj which is belong to project.
|
||||
def source_from
|
||||
"" << self.project.name.to_s <<
|
||||
"#" << (self.project.issues.index(self).to_i + 1).to_s
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def after_project_change
|
||||
|
|
|
@ -27,8 +27,10 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
:datetime => Proc.new {|o| o.updated_on },
|
||||
:author => Proc.new {|o| o.user },
|
||||
:description => Proc.new{|o| o.notes },
|
||||
:type => Proc.new {|o| o.jour_type }#,
|
||||
#:url => Proc.new {|o| ''}#{:controller => 'documents', :action => 'show', :id => o.id}}
|
||||
:type => Proc.new {|o| o.jour_type },
|
||||
:url => Proc.new {|o|
|
||||
(o.jour.kind_of? Project) ? {:controller => 'projects', :action => 'feedback', :id => o.jour, :r => o.id, :anchor => "word_li_#{o.id}"} : {}
|
||||
}#{:controller => 'documents', :action => 'show', :id => o.id}}
|
||||
acts_as_activity_provider :author_key => :user_id,
|
||||
:timestamp => "#{self.table_name}.updated_on",
|
||||
:find_options => {:include => :project }
|
||||
|
|
|
@ -152,8 +152,8 @@ class Project < ActiveRecord::Base
|
|||
where("LOWER(identifier) LIKE :p OR LOWER(name) LIKE :p ", :p => pattern)
|
||||
end
|
||||
}
|
||||
scope :project_entities, -> { where(project_type: 0) }
|
||||
scope :course_entities, -> { where(project_type: 1) }
|
||||
scope :project_entities, -> { where(project_type: ProjectType_project) }
|
||||
scope :course_entities, -> { where(project_type: ProjectType_course) }
|
||||
|
||||
def new_course
|
||||
self.where('project_type = ?', 1)
|
||||
|
|
|
@ -215,6 +215,7 @@ div.pagination{
|
|||
<tr>
|
||||
<td class='description' colspan="5">
|
||||
<div class="tags_area">
|
||||
<% @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %>
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"}%>
|
||||
<div class="tags_gradint"></div>
|
||||
</div>
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
<ul class="list-group-item-meta">
|
||||
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span><%= l(:label_post_on)%> <% a = [] %>
|
||||
<% a << column_content[1] %>
|
||||
<% a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
||||
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
||||
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
|
||||
<%= link_to a.join(' '), issue_path(issue), :class => "issue-link" %>
|
||||
</ul>
|
||||
<% end -%>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
|
||||
|
||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||
:onclick => '$("#custom_query").slideToggle(400); ' if User.current.logged? %>
|
||||
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
<% html_title "#{@issue.tracker.name} #{@issue.source_from}: #{@issue.subject}" %>
|
||||
|
||||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
<h3><%= issue_heading(@issue) %></h3>
|
||||
|
@ -9,14 +12,14 @@
|
|||
<div class="next-prev-links contextual">
|
||||
<%= link_to_if @prev_issue_id,
|
||||
"\xc2\xab #{l(:label_previous)}",
|
||||
(@prev_issue_id ? issue_path(@prev_issue_id) : nil),
|
||||
(@prev_issue_id ? issue_path(Issue.find_by_id(@prev_issue_id)) : nil),
|
||||
:title => "##{@prev_issue_id}" %> |
|
||||
<% if @issue_position && @issue_count %>
|
||||
<span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
|
||||
<% end %>
|
||||
<%= link_to_if @next_issue_id,
|
||||
"#{l(:label_next)} \xc2\xbb",
|
||||
(@next_issue_id ? issue_path(@next_issue_id) : nil),
|
||||
(@next_issue_id ? issue_path(Issue.find_by_id(@next_issue_id)) : nil),
|
||||
:title => "##{@next_issue_id}" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -87,7 +90,7 @@ end %>
|
|||
<% if @issue.description? %>
|
||||
<div class="description">
|
||||
<div class="contextual">
|
||||
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||
</div>
|
||||
|
||||
<p><strong><%=l(:field_description)%></strong></p>
|
||||
|
@ -152,7 +155,6 @@ end %>
|
|||
<%= f.link_to 'PDF' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
|
|
|
@ -1,6 +1,39 @@
|
|||
<%
|
||||
request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil?
|
||||
realUrl = request.original_url
|
||||
if (realUrl.match(/users/))
|
||||
@nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
elsif (realUrl.match(/contest/))
|
||||
@nav_dispaly_contest_label = 1
|
||||
elsif (realUrl.match(/calls/))
|
||||
@nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_bid_label = 1
|
||||
elsif (realUrl.match(/forums/))
|
||||
@nav_dispaly_forum_label = 1
|
||||
elsif (realUrl.match(/forge\.trustie\.net\/*/))
|
||||
@nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
elsif (realUrl.match(/course\.trustie\.net\/*/))
|
||||
@nav_dispaly_course_all_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
@nav_dispaly_store_all_label = 1
|
||||
elsif (realUrl.match(/user\.trustie\.net\/*/))
|
||||
@nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
else
|
||||
@nav_dispaly_course_all_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
@nav_dispaly_bid_label = 1
|
||||
@nav_dispaly_contest_label = 1
|
||||
@nav_dispaly_store_all_label = 1
|
||||
end
|
||||
%>
|
||||
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
|
||||
<div class="welcome_logo">
|
||||
<%=link_to image_tag("/images/logo.png",weight:"36px", height: "36px"), home_path %>
|
||||
<%=link_to image_tag("/images/logo.png",weight:"36px", height: "36px")%>
|
||||
</div>
|
||||
<div id="account">
|
||||
<%= render_menu :account_menu -%>
|
||||
|
@ -15,11 +48,11 @@
|
|||
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li>
|
||||
<% end -%>
|
||||
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li>
|
||||
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.forge_domain}%></li>
|
||||
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.forge_domain }, {:class => 'my-message'} if User.current.logged?%>
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, {:class => 'my-message'} if User.current.logged?%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,39 +1,3 @@
|
|||
<%
|
||||
request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil?
|
||||
realUrl = request.original_url
|
||||
if (realUrl.match(/project\/course/))
|
||||
@nav_dispaly_course_label = 1
|
||||
elsif (realUrl.match(/projects/))
|
||||
@nav_dispaly_project_label = 1
|
||||
elsif (realUrl.match(/users/))
|
||||
@nav_dispaly_user_label = 1
|
||||
elsif (realUrl.match(/contest/))
|
||||
@nav_dispaly_contest_label = 1
|
||||
elsif (realUrl.match(/calls/))
|
||||
@nav_dispaly_bid_label = 1
|
||||
elsif (realUrl.match(/forums/))
|
||||
@nav_dispaly_forum_label = 1
|
||||
elsif (realUrl.match(/[^projects]\/course[^\.]/))
|
||||
@nav_dispaly_course_label = 1
|
||||
@nav_dispaly_project_label = 1
|
||||
@nav_dispaly_contest_label = 1
|
||||
elsif (realUrl.match(/course\.trustie\.net/))
|
||||
@nav_dispaly_course_all_label = 1
|
||||
@nav_dispaly_teacher_all_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
elsif (realUrl.match(/forge\.trustie\.net/))
|
||||
@nav_dispaly_project_label = 1
|
||||
@nav_dispaly_user_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
else
|
||||
@nav_dispaly_course_label = 1
|
||||
@nav_dispaly_project_label = 1
|
||||
@nav_dispaly_user_label = 1
|
||||
@nav_dispaly_contest_label = 1
|
||||
@nav_dispaly_bid_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
end
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= current_language %>">
|
||||
<head>
|
||||
|
|
|
@ -217,15 +217,15 @@
|
|||
<li>
|
||||
<%= link_to l(:label_homework), homework_project_path(@project), :class => link_class(:homework) ,:project_type => 1 %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_file), project_files_path(@project), :class => link_class(:files)%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_news), {:controller => 'news', :action => 'index', :project_id => @project}, :class => link_class(:news) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_board), { :controller => 'boards', :action => 'index', :project_id => @project}, :class => link_class(:boards) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_file), project_files_path(@project), :class => link_class(:files)%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_feedback), project_feedback_path(@project), :class => link_class(:feedback)%>
|
||||
</li>
|
||||
|
|
|
@ -19,8 +19,8 @@ hr {
|
|||
border: 0;
|
||||
}
|
||||
.footer {
|
||||
font-size: 0.8em;
|
||||
font-style: italic;
|
||||
/*font-size: 0.8em;*/
|
||||
/*font-style: italic;*/
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<% else%>
|
||||
<!-- TODO: member.roles unsafe #nyan -->
|
||||
<%= content_tag "div", content_tag("p", member.roles.sort.collect(&:to_s).join(', ')), :class => "clear avatar_name" %>
|
||||
<%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
|
||||
<div class="clear avatar_user">
|
||||
<p>
|
||||
<%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade %></span>
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
<% if @course_tag == '1' %>
|
||||
<h3><%=l(:label_course_new)%></h3>
|
||||
<div class="box tabular">
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)"><%=raw l(:label_course_news_description)%></p>
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
|
||||
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
|
||||
<% else %>
|
||||
<h3><%=l(:label_project_new)%></h3>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)"> <%=raw l(:label_project_new_description)%> </p>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
|
||||
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> -->
|
||||
|
|
|
@ -48,6 +48,22 @@
|
|||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
||||
<div class='hidden'>
|
||||
<% preTags = @preTags.nil? ? [] : @preTags %>
|
||||
<% preTags.each do |tag|%>
|
||||
<%= link_to tag, "
|
||||
javascript:(function(){
|
||||
var $tagInputVal = $('#put-tag-form-"+obj.class.to_s+"-"+obj.id.to_s+"').find('#name');
|
||||
var tagArr = [];
|
||||
tagArr = tagArr.concat( $tagInputVal[0].value.split(',') );
|
||||
tagArr = tagArr.concat('"+tag.to_s+"');
|
||||
tagArr = cleanArray(tagArr);
|
||||
$tagInputVal.val(tagArr.join(','));
|
||||
})();
|
||||
"
|
||||
%>
|
||||
<% end%>
|
||||
</div>
|
||||
<%#= link_to_function l(:button_cancel), "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();"%>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr> <td colspan="2" width="580" > <p class="font_description"> <%= h stringCut240(act.content) %> </p></td> </tr>
|
||||
<tr> <td colspan="2" width="580" > <p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p></td> </tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
|
@ -158,9 +158,9 @@
|
|||
<% when 'Issue' %>
|
||||
<tr>
|
||||
<% if e.user == User.current%>
|
||||
<td colspan="2" valign="top"><strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
||||
<td colspan="2" valign="top"><strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
||||
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr> <td colspan="2" width="580" > <p class="font_description"> <%= textilizable act.description %> </p></td> </tr>
|
||||
|
@ -253,6 +253,6 @@
|
|||
<% end %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function($) {
|
||||
$("#content .pagination:first~ div").find("a").attr("target", "_blank");
|
||||
$("#content .pagination:first~ div").first().find("a").attr("target", "_blank");
|
||||
});
|
||||
</script>
|
|
@ -1,21 +1,21 @@
|
|||
<!--<% unless @events_by_day.empty? %>
|
||||
<!--<%# unless @events_by_day.empty? %>
|
||||
|
||||
<div id="activity">
|
||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||
<h4><%= format_activity_day(day) %></h4>
|
||||
<%# @events_by_day.keys.sort.reverse.each do |day| %>
|
||||
<h4><%#= format_activity_day(day) %></h4>
|
||||
<dl>
|
||||
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
|
||||
<dt class="<%= e.event_type %>">
|
||||
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
||||
<%= content_tag('span', h(e.project), :class => 'project') %>
|
||||
<%= link_to format_activity_title(e.event_title), e.event_url %></dt>
|
||||
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
|
||||
<% end -%>
|
||||
<%# @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
|
||||
<dt class="<%#= e.event_type %>">
|
||||
<span class="time"><%#= format_time(e.event_datetime, false) %></span>
|
||||
<%#= content_tag('span', h(e.project), :class => 'project') %>
|
||||
<%#= link_to format_activity_title(e.event_title), e.event_url %></dt>
|
||||
<dd><span class="description"><%#= format_activity_description(e.event_description) %></span></dd>
|
||||
<%# end -%>
|
||||
</dl>
|
||||
<% end -%>
|
||||
<%# end -%>
|
||||
|
||||
</div>
|
||||
<% end %> -->
|
||||
<%# end %> -->
|
||||
|
||||
|
||||
<% unless @events_by_day.empty? %>
|
||||
|
|
|
@ -1,7 +1,58 @@
|
|||
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||
<%
|
||||
select_option = []
|
||||
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << ['用户', 'users']
|
||||
#select_option << ['教师', 'users_teacher'],
|
||||
#select_option << ['学生', 'users_student']
|
||||
%>
|
||||
<style type="text/css">
|
||||
form #q, form #search_type{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
height: 33px;
|
||||
}
|
||||
form #q{
|
||||
font-size: 13px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-right: none;
|
||||
|
||||
}
|
||||
form #search_type{
|
||||
font-size: 13px;
|
||||
color: #363739;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-left: 1px outset #83A9A9;
|
||||
margin-left: -4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 0.01px;
|
||||
text-overflow: '';
|
||||
}
|
||||
.search_widget{
|
||||
display:inline-block;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.search_widget:hover{
|
||||
box-shadow: 0px 0px 3px #56B4EF;
|
||||
}
|
||||
<%#完了把上面东西放到 .css 里%>
|
||||
</style>
|
||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', :size => 30 %>
|
||||
<%= hidden_field_tag 'project_type', project_type %>
|
||||
<div class='search_widget'>
|
||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
|
||||
<%= select_tag(:search_type, options_for_select(select_option) ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,9 @@
|
|||
<div class='top_bar'>
|
||||
<div class="main-content-bar" style="text-align: center; color: green; font-size: 30px; margin-top: 250px">
|
||||
正在升级中。。。。。。。。。。。。
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 40px"></div>
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<%= stylesheet_link_tag 'welcome' %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
|
@ -16,6 +17,11 @@
|
|||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
// 给主页用户弹新页面
|
||||
$(document).ready(function($) {
|
||||
$("#loggedas").find("a").attr("target", "_blank");
|
||||
//$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -92,10 +98,10 @@
|
|||
</div>
|
||||
<div class="main-content-bar">
|
||||
<div class="welcome_left" >
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_course_description) %></span>
|
||||
</div>
|
||||
<div class="search-bar">
|
||||
<%= render :partial => "search_bar"%>
|
||||
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
@ -104,30 +110,42 @@
|
|||
<div style="clear:both"></div>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag 'welcome' %>
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>新开课程</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1}, :target => "_blank" %></span>
|
||||
<h3><strong>新开课程</strong></h3>
|
||||
<span><%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1} %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_miracle_course(10, 7).map do |project| %>
|
||||
<li style="position:relative;height:5em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%=project.description.to_s%>>
|
||||
<div class='avatar'>
|
||||
<%= image_tag(get_course_avatar(project), :class => "avatar-4") %>
|
||||
</div>
|
||||
<!-- 上左下右 -->
|
||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
||||
<span>[<%= get_course_term project %>]</span>
|
||||
<%#= join_in_course(project, User.current) %>
|
||||
<div class='desc_item text_nowrap' >
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
<div style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(25, omission: '...')%></span>
|
||||
<div class='desc_item' >
|
||||
<span class=''>
|
||||
<% course = Course.find_by_extra(project.identifier) %>
|
||||
<%= course.teacher.user_extensions.occupation.try(:gsub, /(.+)$/, '\1:') %>
|
||||
</span>
|
||||
<span class='font_bolder'>
|
||||
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
||||
<%#=course.try(:teacher).try(:name)%>
|
||||
</span>
|
||||
</div>
|
||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||
<!-- <div class='desc_item' style="">
|
||||
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
||||
</div> -->
|
||||
<div class='join_course_link'>
|
||||
<% if !course_endTime_timeout?(project)%>
|
||||
<div >
|
||||
<%= join_in_course(project, User.current)%>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -136,7 +154,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject hidden" style="float: right;">
|
||||
|
||||
<div class="web_status">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>当前网站状态</strong></h3>
|
||||
|
@ -156,13 +174,13 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align: right; padding-right: 20px">
|
||||
<div class='hidden' style="text-align: right; padding-right: 20px">
|
||||
<%= link_to "意见反馈" , suggestion_send_path, {:class => 'orangeButton', :style => "color: #EEEEEE" }%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="margin-top: 20px; float: right;">
|
||||
<h3 style="padding-bottom:5px ;margin-left: 5px; color: #e8770d;">
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<h3 style="padding-bottom:px ;margin-left: 5px; color: #e8770d;">
|
||||
<strong>问题和反馈动态</strong>
|
||||
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||
|
@ -170,8 +188,8 @@
|
|||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_new_forum_topics(11).each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 20px;padding-bottom:3px; line-height:1.27em; ">
|
||||
<% find_new_forum_topics(10).each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<%= stylesheet_link_tag 'welcome' %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
|
@ -16,6 +17,11 @@
|
|||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
// 给主页用户弹新页面
|
||||
$(document).ready(function($) {
|
||||
$("#loggedas").find("a").attr("target", "_blank");
|
||||
//$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
@ -87,12 +93,12 @@
|
|||
</script>
|
||||
<div class='top_bar'>
|
||||
<div id="identifier-pannel" style="display:none">
|
||||
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
||||
<%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
|
||||
<div class="weixin-content">微信扫码</div>
|
||||
</div>
|
||||
<div class="main-content-bar">
|
||||
<div class="welcome_left" >
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span>
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_project_description) %></span>
|
||||
</div>
|
||||
<div class="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
||||
|
@ -103,36 +109,34 @@
|
|||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
|
||||
<%= stylesheet_link_tag 'welcome' %>
|
||||
|
||||
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_all_hot_project.map do |project| break if(project == find_all_hot_project[10]) %>
|
||||
<li style="background-image:none;">
|
||||
<div style="float: left;">
|
||||
<%= image_tag url_to_avatar(project), :class => "avatar-4" %>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 10px; width: 360px;">
|
||||
<p class="layout">
|
||||
<span style="display: inline-block; width: 250px;"><%= link_to( project.name, :controller => 'projects', :action => 'show', :host=> Setting.project_domain, :id => project.id, :class => "d-g-blue d-p-project-name", :title => "#{project.name}", :target => "_blank" )%></span>
|
||||
<% find_miracle_project(10, 3).map do |project| %>
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
</div>
|
||||
<!-- 上左下右 -->
|
||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||
</div>
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(50, omission: '...')%></span>
|
||||
</div>
|
||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||
<%= content_tag "span", show_grade(project),
|
||||
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
||||
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
||||
:class => "tooltip",
|
||||
:id => "tooltip-#{project.id}" %>
|
||||
</p>
|
||||
<p class="layout-1" >
|
||||
<%= content_tag "span", project.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => project.description %>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end; reset_cycle %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,8 +144,8 @@
|
|||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<ul class="user-welcome-message-list">
|
||||
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
||||
<div class="user-message-box-list">
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||
<% find_all_activities.each do |event| %>
|
||||
<li style="display: block;height:60px; padding-bottom: 4px;">
|
||||
<div class="inner-right" style="float: left; height: 100%; ">
|
||||
|
@ -158,15 +162,18 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||
<div class="right" style="float: right; width: 48%; ">
|
||||
<ul class="welcome-message-list">
|
||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 6px;">
|
||||
<h3 style="color: rgb(21, 188, 207);"><strong>贴吧动态</strong></h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||
<h3 style="color: rgb(21, 188, 207);">
|
||||
<strong>贴吧动态</strong>
|
||||
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
</div>
|
||||
<div class="welcome-box-list-new">
|
||||
<% find_new_forum_topics(8).each do |topic|%>
|
||||
<li class="message-brief-intro" style="min-height: 25px;padding-bottom:3px;">
|
||||
<% find_new_forum_topics(7).each do |topic|%>
|
||||
<li class="message-brief-intro" style="line-height: 1.63em;padding-bottom:3px;">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
|
||||
|
|
|
@ -1391,6 +1391,10 @@ en:
|
|||
label_bids_published: published
|
||||
label_bids_published_ago: ago
|
||||
label_welcome_trustie: Trustie forge
|
||||
label_welcome_trustie_project: Online projects hosting platform
|
||||
label_welcome_trustie_course: Online Courses practice platform
|
||||
label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange.
|
||||
label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
|
||||
label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
|
||||
label_user_project: Projects
|
||||
label_bid_respond_quote: Respond
|
||||
|
|
|
@ -448,7 +448,7 @@ zh:
|
|||
project_module_time_tracking: 时间跟踪
|
||||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
project_module_files: 版本下载
|
||||
project_module_files: 资料下载
|
||||
project_module_wiki: Wiki
|
||||
project_module_repository: 版本库
|
||||
project_module_boards: 讨论区
|
||||
|
@ -463,6 +463,7 @@ zh:
|
|||
label_project: 项目
|
||||
label_activity_project: '项目: ' #added by bai
|
||||
label_project_new: 新建项目
|
||||
label_project_new_description: '项目可以是软件开发项目,也可以是协作研究项目。'
|
||||
label_project_plural: 项目列表
|
||||
label_x_projects:
|
||||
zero: 无项目
|
||||
|
@ -514,7 +515,7 @@ zh:
|
|||
label_requirement: 需求
|
||||
label_new_course: 课程列表
|
||||
label_course_practice: 课程实践
|
||||
label_course_all: 所有课程
|
||||
label_course_all: 课程列表
|
||||
label_teacher_all: 所有教师
|
||||
label_project_deposit: 项目托管
|
||||
label_software_user: 软件创客
|
||||
|
@ -637,6 +638,7 @@ zh:
|
|||
label_homework_commit: 提交作业 #huang
|
||||
label_homework_info: 提交情况 #huang
|
||||
label_course_news: 课程通知
|
||||
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
||||
label_course_board: 讨论区
|
||||
label_version: 版本
|
||||
label_version_new: 新建版本
|
||||
|
@ -1545,7 +1547,10 @@ zh:
|
|||
label_bids_published: 发布于
|
||||
label_bids_published_ago: 之前
|
||||
label_welcome_trustie: Trustie
|
||||
label_welcome_trustie_description: 面向有创意和激情的高校大学生与创业者,提供社交化的项目管理、协同研究、软件开发和众包平台。
|
||||
label_welcome_trustie_project: 在线项目托管平台
|
||||
label_welcome_trustie_course: 在线课程实践平台
|
||||
label_welcome_trustie_project_description: 面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。
|
||||
label_welcome_trustie_course_description: 面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。
|
||||
label_user_project: 项目
|
||||
label_user_course: 课程
|
||||
label_user_homework: 作业
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
RedmineApp::Application.routes.draw do
|
||||
match 'course', :to => 'welcome#course', :via => :get
|
||||
resources :stores do
|
||||
collection do
|
||||
match 'search', via: [:get, :post]
|
||||
|
@ -56,8 +55,8 @@ RedmineApp::Application.routes.draw do
|
|||
match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage'
|
||||
match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage'
|
||||
#added by nie
|
||||
match '/projects/search', :controller => 'projects', :action => 'search', :via => [:get, :post], :as => 'search'
|
||||
match '/users/search', :controller => 'users', :action => 'search', :via => [:get, :post], :as => 'search'
|
||||
match '/projects/search', :controller => 'projects', :action => 'search', :via => [:get, :post]
|
||||
match '/users/search', :controller => 'users', :action => 'search', :via => [:get, :post]
|
||||
#end
|
||||
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
||||
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
||||
|
@ -553,4 +552,6 @@ RedmineApp::Application.routes.draw do
|
|||
match 'tags/remove_tag',:to=>'tags#remove_tag',:as=>"remove_tag"
|
||||
|
||||
match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution'
|
||||
|
||||
get ':controller(/:action(/:id))'
|
||||
end
|
||||
|
|
|
@ -236,11 +236,11 @@ tags_max_length:
|
|||
tags_show_search_results:
|
||||
format: int
|
||||
default: 5
|
||||
forge_domain:
|
||||
default: forge.trustie.net
|
||||
user_domain:
|
||||
default: user.trustie.net
|
||||
project_domain:
|
||||
default: forge.trustie.net
|
||||
contest_domain:
|
||||
default: forge.trustie.net
|
||||
default: contest.trustie.net
|
||||
course_domain:
|
||||
default: forge.trustie.net
|
||||
default: course.trustie.net
|
||||
|
|
106
db/schema.rb
106
db/schema.rb
|
@ -13,6 +13,14 @@
|
|||
|
||||
ActiveRecord::Schema.define(:version => 20140320022724) do
|
||||
|
||||
create_table "a_user_watchers", :force => true do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "member_id"
|
||||
end
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
t.string "act_type", :null => false
|
||||
|
@ -295,9 +303,9 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
||||
|
||||
create_table "issue_relations", :force => true do |t|
|
||||
t.integer "issue_from_id", :null => false
|
||||
t.integer "issue_to_id", :null => false
|
||||
t.string "relation_type", :default => "", :null => false
|
||||
t.integer "issue_from_id", :null => false
|
||||
t.integer "issue_to_id", :null => false
|
||||
t.string "relation_type", :null => false
|
||||
t.integer "delay"
|
||||
end
|
||||
|
||||
|
@ -465,6 +473,22 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||
|
||||
create_table "messages_for_bids", :force => true do |t|
|
||||
t.string "message"
|
||||
t.integer "user_id"
|
||||
t.integer "bid_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "messages_for_users", :force => true do |t|
|
||||
t.integer "messager_id"
|
||||
t.integer "user_id"
|
||||
t.string "message"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "news", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "title", :limit => 60, :default => "", :null => false
|
||||
|
@ -524,11 +548,23 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
t.integer "watchers_count"
|
||||
t.integer "project_id"
|
||||
t.integer "project_type"
|
||||
t.float "grade", :default => 0.0
|
||||
t.integer "course_ac_para", :default => 0
|
||||
t.integer "gitlab_group_id", :limit => 8
|
||||
t.float "grade", :default => 0.0
|
||||
t.integer "course_ac_para", :default => 0
|
||||
end
|
||||
|
||||
add_index "project_statuses", ["changesets_count"], :name => "index_project_statuses_on_changesets_count"
|
||||
add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade"
|
||||
add_index "project_statuses", ["watchers_count"], :name => "index_project_statuses_on_watchers_count"
|
||||
|
||||
create_table "project_tags", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "tag_id"
|
||||
t.string "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.string "name", :default => "", :null => false
|
||||
|
@ -574,17 +610,18 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
add_index "queries", ["user_id"], :name => "index_queries_on_user_id"
|
||||
|
||||
create_table "repositories", :force => true do |t|
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.string "url", :default => "", :null => false
|
||||
t.string "login", :limit => 60, :default => ""
|
||||
t.string "password", :default => ""
|
||||
t.string "root_url", :default => ""
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.string "url", :default => "", :null => false
|
||||
t.string "login", :limit => 60, :default => ""
|
||||
t.string "password", :default => ""
|
||||
t.string "root_url", :default => ""
|
||||
t.string "type"
|
||||
t.string "path_encoding", :limit => 64
|
||||
t.string "log_encoding", :limit => 64
|
||||
t.string "path_encoding", :limit => 64
|
||||
t.string "log_encoding", :limit => 64
|
||||
t.text "extra_info"
|
||||
t.string "identifier"
|
||||
t.boolean "is_default", :default => false
|
||||
t.boolean "is_default", :default => false
|
||||
t.string "git_project_id"
|
||||
end
|
||||
|
||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||
|
@ -605,26 +642,6 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "seems_rateable_cached_ratings", :force => true do |t|
|
||||
t.integer "cacheable_id", :limit => 8
|
||||
t.string "cacheable_type"
|
||||
t.float "avg", :null => false
|
||||
t.integer "cnt", :null => false
|
||||
t.string "dimension"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "seems_rateable_rates", :force => true do |t|
|
||||
t.integer "rater_id", :limit => 8
|
||||
t.integer "rateable_id"
|
||||
t.string "rateable_type"
|
||||
t.float "stars", :null => false
|
||||
t.string "dimension"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "settings", :force => true do |t|
|
||||
t.string "name", :default => "", :null => false
|
||||
t.text "value"
|
||||
|
@ -635,9 +652,9 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
|
||||
create_table "shares", :force => true do |t|
|
||||
t.date "created_on"
|
||||
t.string "url"
|
||||
t.string "title"
|
||||
t.integer "share_type"
|
||||
t.string "share_type"
|
||||
t.string "url"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "project_id"
|
||||
|
@ -645,6 +662,12 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
t.string "description"
|
||||
end
|
||||
|
||||
create_table "students", :force => true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "students_for_courses", :force => true do |t|
|
||||
t.integer "student_id"
|
||||
t.integer "course_id"
|
||||
|
@ -703,7 +726,7 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
create_table "tokens", :force => true do |t|
|
||||
t.integer "user_id", :default => 0, :null => false
|
||||
t.string "action", :limit => 30, :default => "", :null => false
|
||||
t.string "value", :limit => 40, :default => "", :null => false
|
||||
t.string "value", :limit => 40
|
||||
t.datetime "created_on", :null => false
|
||||
end
|
||||
|
||||
|
@ -729,12 +752,13 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
t.integer "zip_code"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "technical_title"
|
||||
t.integer "identity"
|
||||
t.string "technical_title"
|
||||
t.string "student_id"
|
||||
t.string "teacher_realname"
|
||||
t.string "student_realname"
|
||||
t.string "location_city"
|
||||
t.string "git_token"
|
||||
end
|
||||
|
||||
create_table "user_grades", :force => true do |t|
|
||||
|
@ -771,6 +795,14 @@ ActiveRecord::Schema.define(:version => 20140320022724) do
|
|||
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
|
||||
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
||||
|
||||
create_table "user_tags", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "tag_id"
|
||||
t.string "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "login", :default => "", :null => false
|
||||
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||
|
|
|
@ -203,7 +203,7 @@ Redmine::AccessControl.map do |map|
|
|||
end
|
||||
#by young
|
||||
Redmine::MenuManager.map :top_menu do |menu|
|
||||
menu.push :home, {:host => Setting.forge_domain}
|
||||
menu.push :home, {:host => Setting.user_domain}
|
||||
menu.push :course_practice, {:controller => 'projects', :action => 'course', :project_type => 1}
|
||||
menu.push :project_deposit, { :controller => 'projects', :action => 'index', :project_type => 0}, :caption => :label_project_deposit
|
||||
menu.push :software_user, {:controller => 'users', :action => 'index'}
|
||||
|
@ -264,7 +264,7 @@ end
|
|||
# end
|
||||
|
||||
Redmine::MenuManager.map :account_menu do |menu|
|
||||
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.forge_domain}, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :login, {:controller => 'account', :action => 'login', :host => Setting.user_domain}, :if => Proc.new { !User.current.logged? }
|
||||
menu.push :register, {:controller => 'account', :action => 'register'}, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
|
||||
# menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
|
||||
menu.push :logout, {:controller => 'account', :action => 'logout'}, :html => {:method => 'post'}, :if => Proc.new { User.current.logged? }
|
||||
|
@ -341,29 +341,29 @@ Redmine::MenuManager.map :course_menu do |menu|
|
|||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain }
|
||||
menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain}
|
||||
#menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
# menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_enterprise_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain }
|
||||
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.user_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
|
||||
|
||||
end
|
||||
Redmine::MenuManager.map :user_menu_self do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.forge_domain }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.forge_domain}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.forge_domain}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.forge_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.forge_domain}
|
||||
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.project_domain }
|
||||
menu.push :user_information, {:controller => 'users', :action => 'info', :host => Setting.user_domain}
|
||||
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids', :host => Setting.user_domain}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback', :host => Setting.user_domain}
|
||||
|
||||
end
|
||||
#end
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
/* Redmine - project management software
|
||||
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
||||
|
||||
function cleanArray (actual){
|
||||
var newArray = new Array();
|
||||
for (var i = 0; i< actual.length; i++){
|
||||
if (actual[i]){
|
||||
newArray.push(actual[i]);
|
||||
}
|
||||
}
|
||||
return newArray;
|
||||
}
|
||||
|
||||
function checkAll(id, checked) {
|
||||
if (checked) {
|
||||
$('#'+id).find('input[type=checkbox]').attr('checked', true);
|
||||
|
|
|
@ -606,9 +606,9 @@ ul.tool li{list-style-type:none;
|
|||
}
|
||||
|
||||
.font_welcome_trustie{
|
||||
font-family:Impact;
|
||||
font-weight: regular;
|
||||
font-size: 24px;
|
||||
font-family: Tahoma,"Microsoft YaHei";
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
color:#15bccf;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,21 @@
|
|||
-moz-box-sizing: border-box;
|
||||
-box-sizing: border-box;
|
||||
}
|
||||
/*文字不换行*/
|
||||
.text_nowrap{
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
/*字体 斜体*/
|
||||
.font_italic{
|
||||
font-style: italic;
|
||||
}
|
||||
/*字体加粗*/
|
||||
.font_bolder{
|
||||
font-weight: bolder;
|
||||
}
|
||||
.text_center{
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -571,3 +586,18 @@ input.blueinputbar:focus {
|
|||
.courses_history a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* issue div.issues
|
||||
*******************************************************************************/
|
||||
div.issue{
|
||||
background: none repeat scroll 0 0 #FFFFEC;
|
||||
/*border: none;*/
|
||||
margin-bottom: 6px;
|
||||
padding: 10;
|
||||
border-radius: 3px;
|
||||
/* -moz-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
|
||||
-webkit-box-shadow: 3px 3px 10px rgba(100,150,205,0.1);
|
||||
box-shadow: 3px 3px 10px rgba(100,150,205,0.1);*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,63 +1,3 @@
|
|||
/*.body_resize { width:950px; margin:0 auto; padding:0;}
|
||||
.left { width:371px; float:left; margin:20px 5px 10px 5px; padding:5px;}
|
||||
|
||||
.right { width:527px; float:left; margin:20px 5px 10px 5px; padding:5px;}
|
||||
.right ul { list-style:none; margin:5px 20px; padding:0;}
|
||||
.right li { font: bold 12px Arial, Helvetica, sans-serif; color:#6f6f6f; padding:5px 20px; margin:0; background:url(images/about_ul_li.gif) left no-repeat;}
|
||||
|
||||
|
||||
.body { background:#ebebeb; border-bottom:1px solid #fff; }
|
||||
|
||||
.home {
|
||||
font:bold 16px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
|
||||
color:#2c2c2c;
|
||||
border-bottom:1px solid #cccccc;
|
||||
padding:10px 5px;
|
||||
margin:0 0 10px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font:normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
|
||||
color:#6f6f6f;
|
||||
line-height:1.8em;
|
||||
padding:5px 5px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
div.project {
|
||||
font:normal 15px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
|
||||
color:#6f6f6f;
|
||||
line-height:1.8em;
|
||||
padding:5px 5px;
|
||||
margin:0;
|
||||
border-bottom:1px solid #eeeeee;
|
||||
width: 95%;
|
||||
float: right;
|
||||
}
|
||||
div.project a{
|
||||
color: #5B5B5B;
|
||||
}
|
||||
|
||||
div.project {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
div.project>.nowrap {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
span.grey {
|
||||
float: right;
|
||||
font: normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
|
||||
color:#afaeae;
|
||||
line-height:1.8em;
|
||||
padding:5px 5px;
|
||||
margin:0;
|
||||
}*/
|
||||
.top_bar{
|
||||
height: auto;
|
||||
}
|
||||
|
@ -120,7 +60,6 @@ ul.welcome-message-list{
|
|||
height: 25px;
|
||||
line-height: 25px;
|
||||
background-color: rgb(252, 252, 252);
|
||||
color: green;
|
||||
/*text-indent: 8px;*/
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
|
@ -142,7 +81,7 @@ ul.welcome-message-list{
|
|||
}
|
||||
.d-p-index-hotproject{
|
||||
width: 48%;
|
||||
margin-top: 40px;
|
||||
margin-top: 10px;
|
||||
float: left;
|
||||
}
|
||||
ul.d-p-index-hdright{
|
||||
|
@ -200,9 +139,41 @@ ul.even{
|
|||
font-weight: 700;
|
||||
|
||||
}
|
||||
/*course welcome,左侧新开课程部分开始*/
|
||||
ul.d-p-projectlist{
|
||||
margin-top: 0px;
|
||||
}
|
||||
#J_Slide h3{
|
||||
margin-left: 5px;
|
||||
color: #e8770d;
|
||||
}
|
||||
#J_Slide h3~span{
|
||||
margin-top: -20px;
|
||||
float: right;
|
||||
display: block;
|
||||
}
|
||||
.d-p-projectlist li{
|
||||
position: relative;
|
||||
height:5em;
|
||||
}
|
||||
.d-p-projectlist li > .avatar{
|
||||
float: left;
|
||||
height: 100%;
|
||||
}
|
||||
.d-p-projectlist li > .join_course_link{
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
right:0;
|
||||
margin:5px 10px 5px 5px;
|
||||
}
|
||||
.d-p-projectlist li .desc_item{
|
||||
float: left;
|
||||
display: inline-block;
|
||||
line-height: 2em;
|
||||
margin-left: 10px;
|
||||
width: 380px;
|
||||
}
|
||||
/*course welcome,左侧新开课程部分结束?*/
|
||||
|
||||
|
||||
/*
|
||||
|
@ -338,7 +309,7 @@ a.attachments_list_color {
|
|||
margin: 0;
|
||||
margin-top: 35px;
|
||||
padding: 0;
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 35px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue