Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/controllers/admin_controller.rb db/schema.rb
This commit is contained in:
commit
c1c05067e7
|
@ -41,7 +41,7 @@ module Mobile
|
|||
mount Apis::Comments
|
||||
|
||||
#add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
|
||||
#add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
|
||||
add_swagger_documentation ({api_version: 'v1', base_path: '/api'}) if Rails.env.development?
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -322,6 +322,13 @@ class AdminController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#组织
|
||||
def organization
|
||||
@organizations = Organization.all
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
#移动端版本管理
|
||||
def mobile_version
|
||||
@versions = PhoneAppVersion.reorder('created_at desc')
|
||||
|
|
|
@ -186,6 +186,10 @@ class AttachmentsController < ApplicationController
|
|||
|
||||
@attachment = Attachment.new(:file => request.raw_post)
|
||||
@attachment.author = User.current
|
||||
if !params[:project].nil?
|
||||
@attachment.container_type = 'Project'
|
||||
@attachment.container_id = params[:project].split("?")[0]
|
||||
end
|
||||
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16)
|
||||
saved = @attachment.save
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ class BoardsController < ApplicationController
|
|||
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {
|
||||
sort_init 'updated_on', 'desc'
|
||||
sort_update 'created_on' => "#{Message.table_name}.created_on",
|
||||
|
|
|
@ -61,6 +61,10 @@ class DocumentsController < ApplicationController
|
|||
if @project.project_type ==1
|
||||
render :action => 'show', :layout => 'base_courses'
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -148,7 +148,11 @@ class FilesController < ApplicationController
|
|||
|
||||
show_attachments @containers
|
||||
|
||||
render :layout => !request.xhr?
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
elsif params[:course_id]
|
||||
@isproject = false
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ class IssuesController < ApplicationController
|
|||
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
||||
format.api {
|
||||
Issue.load_visible_relations(@issues) if include_in_api_response?('relations')
|
||||
|
@ -103,6 +104,7 @@ class IssuesController < ApplicationController
|
|||
format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young
|
||||
format.any(:atom, :csv, :pdf) { render(:nothing => true) }
|
||||
format.api { render_validation_errors(@query) }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
@ -153,6 +155,8 @@ class IssuesController < ApplicationController
|
|||
def create
|
||||
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
|
||||
@issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1
|
||||
if @issue.save
|
||||
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
|
||||
respond_to do |format|
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
class OrganizationController < ApplicationController
|
||||
layout 'project_base'
|
||||
before_filter :require_admin, :except => [:index]
|
||||
|
||||
def index
|
||||
#@projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)")
|
||||
@organizations = Organization.all
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@organizations = Organization.new
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@organizations = Organization.new
|
||||
@organizations.name = params[:organization][:name]
|
||||
if @organizations.save
|
||||
redirect_to admin_organization_url
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@organization = Organization.find params[:id]
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
rescue Exception => e
|
||||
render_404
|
||||
end
|
||||
|
||||
def update
|
||||
@organization = Organization.find params[:id]
|
||||
@organization.name = params[:organization][:name]
|
||||
if @organization.save
|
||||
redirect_to admin_organization_url
|
||||
end
|
||||
rescue Exception => e
|
||||
render_404
|
||||
end
|
||||
|
||||
def destroy
|
||||
@organization = Organization.find params[:id]
|
||||
if @organization.destroy
|
||||
redirect_to admin_organization_url
|
||||
end
|
||||
rescue Exception => e
|
||||
render_404
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
class OrganizationsController < ApplicationController
|
||||
layout 'project_base'
|
||||
def index
|
||||
@projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)")
|
||||
end
|
||||
end
|
|
@ -179,6 +179,7 @@ class ProjectsController < ApplicationController
|
|||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
@project.organization_id = params[:organization_id]
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
|
@ -248,6 +249,7 @@ class ProjectsController < ApplicationController
|
|||
# Author lizanle
|
||||
# Description 项目动态展示方法,删除了不必要的代码
|
||||
def show
|
||||
=begin
|
||||
# 试图跳转到请求的按钮
|
||||
if params[:login]
|
||||
login = params[:login]
|
||||
|
@ -282,35 +284,43 @@ class ProjectsController < ApplicationController
|
|||
# 时间跨度不能太大,不然很慢,所以删掉了-1.years
|
||||
@date_from = @date_to - @days
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
=end
|
||||
|
||||
@author = params[:user_id].blank? ? nil : User.active.find(params[:user_id])
|
||||
# 决定显示所用用户或单个用户活动
|
||||
=begin
|
||||
@activity = Redmine::Activity::Fetcher.new(User.current,
|
||||
:project => @project,
|
||||
:with_subprojects => @with_subprojects,
|
||||
:author => @author)
|
||||
@activity.scope_select {|t| !has["show_#{t}"].nil?}
|
||||
=end
|
||||
|
||||
# 根据私密性,取出符合条件的所有数据
|
||||
if User.current.member_of?(@project) || User.current.admin?
|
||||
events = @activity.events(@date_from, @date_to)
|
||||
@events_pages = ForgeActivity.where("project_id = ?",@project).order("created_at desc").page(params['page'|| 1]).per(20);
|
||||
#events = @activity.events(@date_from, @date_to)
|
||||
else
|
||||
events = @activity.events(@date_from, @date_to, :is_public => 1)
|
||||
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
||||
= ?",@project,1).order("created_at desc")
|
||||
.page(params['page'|| 1]).per(10);
|
||||
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
||||
end
|
||||
|
||||
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@events_count = events.count
|
||||
@events_pages = Paginator.new @events_count, @limit, params['page']
|
||||
@offset ||= @events_pages.offset
|
||||
=begin
|
||||
@events_pages = Paginator.new events.count, 10, params['page']
|
||||
# 总的数据中取出某一页
|
||||
events = events.slice(@offset,@limit)
|
||||
events = events.slice(@events_pages.offset,10)
|
||||
# 按天分组
|
||||
@events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
|
||||
|
||||
=end
|
||||
boards = @project.boards.includes(:last_message => :author).all
|
||||
@topic_count = @project.boards.count
|
||||
# 根据对应的请求,返回对应的数据
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.api
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -322,6 +332,20 @@ class ProjectsController < ApplicationController
|
|||
@wiki ||= @project.wiki
|
||||
end
|
||||
|
||||
|
||||
#发送邮件邀请新用户
|
||||
def invite_members_by_mail
|
||||
|
||||
end
|
||||
|
||||
# 邀请Trustie注册用户
|
||||
def invite_members_had_loged
|
||||
@member ||= @project.members.new
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
|
@ -404,6 +428,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def update
|
||||
@project.safe_attributes = params[:project]
|
||||
@project.organization_id = params[:organization_id]
|
||||
#@project.dts_test = params[:project][:dts_test]
|
||||
if validate_parent_id && @project.save
|
||||
@course = Course.find_by_extra(@project.identifier)
|
||||
|
|
|
@ -408,6 +408,9 @@ class UsersController < ApplicationController
|
|||
|
||||
def show
|
||||
pre_count = 10 #limit
|
||||
# Time 2015-02-04 11:46:34
|
||||
# Author lizanle
|
||||
# Description type 1 :所有动态包括我关注的人 type 2:我的动态 type 3:关于我的回复
|
||||
case params[:type]
|
||||
when "1"
|
||||
if @user == User.current
|
||||
|
@ -428,26 +431,27 @@ class UsersController < ApplicationController
|
|||
messages = message.sort {|x,y| y.created_on <=> x.created_on }
|
||||
@message = messages[@info_pages.offset, @info_pages.per_page]
|
||||
@state = 2
|
||||
else
|
||||
else
|
||||
# Time 2015-02-04 10:50:49
|
||||
# Author lizanle
|
||||
# Description 所有动态
|
||||
where_condition = nil;
|
||||
# where_condition = "act_type <> 'JournalsForMessage'"
|
||||
if @user == User.current
|
||||
watcher = User.watched_by(@user)
|
||||
watcher.push(User.current)
|
||||
activity = Activity.where(where_condition).where('user_id in (?)', watcher).order('id desc')
|
||||
activity = Activity.where(where_condition).where('user_id in (?)', watcher).order('id desc')
|
||||
else
|
||||
activity = Activity.where(where_condition).where('user_id = ?', @user.id).order('id desc')
|
||||
end
|
||||
|
||||
@activity_count = activity.count
|
||||
@activity_pages = Paginator.new @activity_count, pre_count, params['page']
|
||||
activity_page = activity.slice(@activity_pages.offset,@activity_pages.per_page * 2)
|
||||
activity_page = activity_page.reject { |e|
|
||||
@activity = activity.slice(@activity_pages.offset,@activity_pages.per_page )
|
||||
@activity = @activity.reject { |e|
|
||||
((e.act_type=="Issue") && ( !e.act.visible?(User.current))) ||
|
||||
((e.act_type == "Journal") && (!e.act.project.visible?(User.current))) ||
|
||||
((e.act_type == "Bid") && ((!User.current.member_of_course?(e.act.courses.first) || !User.current.admin?)))
|
||||
}
|
||||
@activity = activity.slice(0,@activity_pages.per_page)
|
||||
@state = 0
|
||||
end
|
||||
|
||||
|
|
|
@ -27,28 +27,31 @@ class WelcomeController < ApplicationController
|
|||
def index
|
||||
# 企业版定制: params[:project]为传过来的参数
|
||||
unless params[:organization].nil?
|
||||
@cur_projects = Project.find(params[:organization])
|
||||
@organization = @cur_projects.enterprise_name
|
||||
@organization_projects = (current_user.admin? || User.current.member_of?(@cur_projects)) ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization)
|
||||
@e_count = @organization_projects.count
|
||||
@part_projects = []
|
||||
# 取十个
|
||||
@organization_projects.each do |obj|
|
||||
break if(@organization_projects[10] == obj)
|
||||
@part_projects << Project.visible.find_by_id("#{obj.id}") unless obj.id.nil?
|
||||
end
|
||||
# 不够十个的用最火项目替代
|
||||
@e_count < 9 ? @part_projects = find_miracle_project( 9 - @e_count, 3,"score desc") : @part_projects
|
||||
# 配置文件首页定制
|
||||
@organization = Organization.find params[:organization]
|
||||
@organization_projects = Project.visible.joins(:project_status).joins("LEFT JOIN project_scores ON projects.id = project_scores.project_id").where("projects.organization_id = ?", @organization.id).order("score DESC").limit(10).all
|
||||
@part_projects = @organization_projects.count < 9 ? find_miracle_project( 9 - @organization_projects.count, 3,"score desc") : []
|
||||
# @cur_projects = Project.find(params[:organization])
|
||||
# @organization = @cur_projects.enterprise_name
|
||||
# @organization_projects = (current_user.admin? || User.current.member_of?(@cur_projects)) ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization)
|
||||
# @e_count = @organization_projects.count
|
||||
# @part_projects = []
|
||||
# # 取十个
|
||||
# @organization_projects.each do |obj|
|
||||
# break if(@organization_projects[10] == obj)
|
||||
# @part_projects << Project.visible.find_by_id("#{obj.id}") unless obj.id.nil?
|
||||
# end
|
||||
# # 不够十个的用最火项目替代
|
||||
# @e_count < 9 ? @part_projects = find_miracle_project( 9 - @e_count, 3,"score desc") : @part_projects
|
||||
# # 配置文件首页定制
|
||||
@enterprise_page = FirstPage.find_by_page_type('enterprise')
|
||||
if @enterprise_page.nil?
|
||||
@enterprise_page = FirstPage.new
|
||||
@enterprise_page.page_type = 'enterprise'
|
||||
end
|
||||
# 主页配置部分结束
|
||||
|
||||
# 主页配置部分结束
|
||||
end
|
||||
# end 企业版定制结束
|
||||
|
||||
if @first_page.nil? || @first_page.sort_type.nil?
|
||||
@projects = find_miracle_project(10, 3,"score desc")
|
||||
else
|
||||
|
@ -74,7 +77,8 @@ class WelcomeController < ApplicationController
|
|||
@projects = @projects_all.order("score desc")
|
||||
end
|
||||
end
|
||||
|
||||
rescue Exception => e
|
||||
render_404
|
||||
end
|
||||
|
||||
def robots
|
||||
|
|
|
@ -48,7 +48,7 @@ module ApplicationHelper
|
|||
def authorize_for(controller, action)
|
||||
User.current.allowed_to?({:controller => controller, :action => action}, @project)
|
||||
end
|
||||
|
||||
|
||||
# add by nwb
|
||||
def authorize_for_course(controller, action)
|
||||
User.current.allowed_to?({:controller => controller, :action => action}, @course)
|
||||
|
@ -1841,7 +1841,7 @@ module ApplicationHelper
|
|||
# course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'}
|
||||
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 => 'courses', :action => 'index'}
|
||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_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 => 'contests', :action => 'index'}
|
||||
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
|
||||
forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"}
|
||||
|
@ -1860,7 +1860,7 @@ module ApplicationHelper
|
|||
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
|
||||
# nav_list.push(projects_link) if @nav_dispaly_project_label
|
||||
nav_list.push(users_link) if @nav_dispaly_user_label
|
||||
#nav_list.push(users_link) if @nav_dispaly_user_label
|
||||
# nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
|
||||
nav_list.push(bids_link) if @nav_dispaly_bid_label
|
||||
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
module ExpireHelper
|
||||
#index.html 中 “projects”塊 緩存過期
|
||||
def expire_project_cache
|
||||
ActionController::Base.new.expire_fragment('projects')
|
||||
end
|
||||
|
||||
#index.html 中 “activities”塊 緩存過期
|
||||
def expire_activitie_cache
|
||||
ActionController::Base.new.expire_fragment('activities')
|
||||
end
|
||||
|
||||
#welcome/index.html 中 “forums”塊 緩存過期
|
||||
def expire_forum_cache
|
||||
ActionController::Base.new.expire_fragment('forums')
|
||||
end
|
||||
end
|
|
@ -371,4 +371,19 @@ module ProjectsHelper
|
|||
|
||||
return projects
|
||||
end
|
||||
|
||||
def project_organizations_id_option
|
||||
type = []
|
||||
option1 = []
|
||||
option1 << l(:label_organization_choose)
|
||||
option1 << 0
|
||||
type << option1
|
||||
Organization.all.each do |org|
|
||||
option = []
|
||||
option << org.name
|
||||
option << org.id
|
||||
type << option
|
||||
end
|
||||
type
|
||||
end
|
||||
end
|
||||
|
|
|
@ -283,6 +283,6 @@ module WatchersHelper
|
|||
|
||||
def exit_project_link(project)
|
||||
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
|
||||
:remote => true, :confirm => l(:lable_sure_exit_project) )
|
||||
:remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px;margin-right:10px;height:20px;text-aligh:center;" )
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,9 @@ class Attachment < ActiveRecord::Base
|
|||
belongs_to :softapplication, foreign_key: 'container_id', conditions: "attachments.container_type = 'Softapplication'"
|
||||
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
|
||||
belongs_to :attachmentstype, :foreign_key => "attachtype",:primary_key => "id"
|
||||
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
include UserScoreHelper
|
||||
|
||||
validates :filename, presence: true, length: {maximum: 254}
|
||||
|
@ -70,7 +72,7 @@ class Attachment < ActiveRecord::Base
|
|||
@@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails")
|
||||
|
||||
before_save :files_to_final_location
|
||||
after_create :be_user_score # user_score
|
||||
after_create :be_user_score ,:act_as_forge_activity# user_score
|
||||
after_update :be_user_score
|
||||
after_destroy :delete_from_disk,:down_user_score
|
||||
|
||||
|
@ -529,4 +531,14 @@ class Attachment < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
# Time 2015-03-02 17:42:48
|
||||
# Author lizanle
|
||||
# Description 上传该项目的文档资料也要保存一份在公共表中
|
||||
def act_as_forge_activity
|
||||
if self.container_type == 'Project'
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||
:project_id => self.container_id)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -17,7 +17,6 @@ class Bid < ActiveRecord::Base
|
|||
HomeworkProject = 2
|
||||
attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password
|
||||
include Redmine::SafeAttributes
|
||||
include ExpireHelper
|
||||
|
||||
belongs_to :author, :class_name => 'User', :foreign_key => :author_id
|
||||
belongs_to :course
|
||||
|
@ -33,12 +32,6 @@ class Bid < ActiveRecord::Base
|
|||
has_many :join_in_contests, :dependent => :destroy
|
||||
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
||||
# has_many :fork_homework, :class_name => 'Bid', :conditions => "#{Bid.table_name}.parent_id = #{id}"
|
||||
|
||||
|
||||
after_create :expire_activitie_cache
|
||||
after_update :expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
|
||||
acts_as_attachable
|
||||
|
||||
NAME_LENGTH_LIMIT = 60
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class Changeset < ActiveRecord::Base
|
||||
include ExpireHelper
|
||||
belongs_to :repository
|
||||
belongs_to :user
|
||||
include UserScoreHelper
|
||||
|
@ -65,9 +64,8 @@ class Changeset < ActiveRecord::Base
|
|||
includes(:repository => :project).where(Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args))
|
||||
}
|
||||
|
||||
after_create :scan_for_issues,:refresh_changests,:expire_activitie_cache#:be_user_score # user_score
|
||||
after_update :be_user_score,:expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
after_create :scan_for_issues,:refresh_changests#:be_user_score # user_score
|
||||
after_update :be_user_score
|
||||
after_destroy :down_user_score
|
||||
before_create :before_create_cs
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
class ContestNotification < ActiveRecord::Base
|
||||
include ExpireHelper
|
||||
attr_accessible :content, :title
|
||||
validates :title, length: {maximum: 30}
|
||||
after_create :expire_forum_cache
|
||||
after_update :expire_forum_cache
|
||||
before_destroy :expire_forum_cache
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -17,18 +17,16 @@
|
|||
|
||||
class Document < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include ExpireHelper
|
||||
belongs_to :project
|
||||
belongs_to :user
|
||||
belongs_to :category, :class_name => "DocumentCategory", :foreign_key => "category_id"
|
||||
include UserScoreHelper
|
||||
after_save :be_user_score # user_score
|
||||
after_destroy :down_user_score
|
||||
after_create :expire_activitie_cache
|
||||
after_update :expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
acts_as_attachable :delete_permission => :delete_documents
|
||||
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project
|
||||
acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"},
|
||||
#:author => Proc.new {|o| o.attachments.reorder("#{Attachment.table_name}.created_on ASC").first.try(:author) },
|
||||
|
@ -39,7 +37,7 @@ class Document < ActiveRecord::Base
|
|||
|
||||
validates_presence_of :project, :title, :category
|
||||
validates_length_of :title, :maximum => 60
|
||||
|
||||
after_create :act_as_forge_activity
|
||||
scope :visible, lambda {|*args|
|
||||
includes(:project).where(Project.allowed_to_condition(args.shift || User.current, :view_documents, *args))
|
||||
}
|
||||
|
@ -81,5 +79,12 @@ class Document < ActiveRecord::Base
|
|||
update_document(self.user,2,self.project)
|
||||
end
|
||||
|
||||
# Time 2015-03-02 10:51:16
|
||||
# Author lizanle
|
||||
# Description 新创建的document要在公共表ForgeActivity中记录
|
||||
def act_as_forge_activity
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.user_id,
|
||||
:project_id => self.project_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# Time 2015-02-06 10:42:34
|
||||
# Author lizanle
|
||||
# Description 这是保存Project相关的动态的公共表
|
||||
class ForgeActivity < ActiveRecord::Base
|
||||
# 公共表中活动类型,命名规则:TYPE_OF_{类名}_ACT
|
||||
TYPE_OF_ISSUE_ACT = "Issue"
|
||||
TYPE_OF_MESSAGE_ACT = "Message"
|
||||
TYPE_OF_ATTACHMENT_ACT = "Attachment"
|
||||
TYPE_OF_DOCUMENT_ACT = "Document"
|
||||
TYPE_OF_JOURNAL_ACT = "Journal"
|
||||
TYPE_OF_WIKI_ACT = "Wiki"
|
||||
TYPE_OF_NEWS_ACT = "News"
|
||||
attr_accessible :forge_act_id, :forge_act_type,:project_id,:user_id,:org_id
|
||||
# 虚拟关联
|
||||
belongs_to :forge_act ,:polymorphic => true
|
||||
belongs_to :project
|
||||
belongs_to :user
|
||||
validates :user_id,presence: true
|
||||
validates :project_id,presence: true
|
||||
validates :forge_act_id,presence: true
|
||||
validates :forge_act_type, presence: true
|
||||
end
|
|
@ -1,13 +1,8 @@
|
|||
class Forum < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include ExpireHelper
|
||||
has_many :topics, :class_name => 'Memo', :conditions => "#{Memo.table_name}.parent_id IS NULL", :order => "#{Memo.table_name}.created_at DESC", :dependent => :destroy
|
||||
has_many :memos, :dependent => :destroy, conditions: "parent_id IS NULL"
|
||||
belongs_to :creator, :class_name => "User", :foreign_key => 'creator_id'
|
||||
|
||||
after_create :expire_forum_cache
|
||||
after_update :expire_forum_cache
|
||||
before_destroy :expire_forum_cache
|
||||
safe_attributes 'name',
|
||||
'description',
|
||||
'topic_count',
|
||||
|
|
|
@ -19,7 +19,6 @@ class Issue < ActiveRecord::Base
|
|||
include Redmine::SafeAttributes
|
||||
include Redmine::Utils::DateCalculation
|
||||
include UserScoreHelper
|
||||
include ExpireHelper
|
||||
belongs_to :project
|
||||
belongs_to :tracker
|
||||
belongs_to :status, :class_name => 'IssueStatus', :foreign_key => 'status_id'
|
||||
|
@ -46,6 +45,8 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
# added by fq
|
||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
||||
|
||||
|
@ -64,7 +65,9 @@ class Issue < ActiveRecord::Base
|
|||
},
|
||||
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o}},
|
||||
:type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
|
||||
|
||||
# Time 2015-01-31 13:52:53
|
||||
# Author lizanle
|
||||
# Description 将hash传进去
|
||||
acts_as_activity_provider :find_options => {:include => [:project, :author, :tracker]},
|
||||
:author_key => :author_id
|
||||
|
||||
|
@ -77,12 +80,9 @@ class Issue < ActiveRecord::Base
|
|||
attr_reader :current_journal
|
||||
|
||||
# fq
|
||||
after_create :act_as_activity,:be_user_score_new_issue
|
||||
after_create :act_as_activity,:be_user_score_new_issue,:act_as_forge_activity
|
||||
after_update :be_user_score
|
||||
after_destroy :down_user_score
|
||||
after_create :expire_activitie_cache
|
||||
after_update :expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
# after_create :be_user_score
|
||||
# end
|
||||
|
||||
|
@ -129,7 +129,15 @@ class Issue < ActiveRecord::Base
|
|||
self.acts << Activity.new(:user_id => self.author_id)
|
||||
end
|
||||
# end
|
||||
|
||||
|
||||
# Time 2015-02-26 10:51:16
|
||||
# Author lizanle
|
||||
# Description 新创建的issue要在公共表ForgeActivity中记录
|
||||
def act_as_forge_activity
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||
:project_id => self.project_id)
|
||||
end
|
||||
# end
|
||||
|
||||
|
||||
# Returns a SQL conditions string used to find all issues visible by the specified user
|
||||
|
@ -1168,13 +1176,13 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
# back string obj which is belong to project.
|
||||
def source_from
|
||||
"" << self.project.name.to_s <<
|
||||
"#" << project_index
|
||||
"" << self.project.name.to_s
|
||||
end
|
||||
|
||||
def project_index
|
||||
if self.project.issues.include?(self)
|
||||
(self.project.issues.index(self).to_i + 1).to_s
|
||||
|
||||
else
|
||||
issue_index = 1
|
||||
self.project.issues.each do |issue|
|
||||
|
@ -1185,8 +1193,10 @@ class Issue < ActiveRecord::Base
|
|||
issue_index = issue_index+1
|
||||
end
|
||||
end
|
||||
|
||||
issue_index.to_s
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -27,6 +27,8 @@ class Journal < ActiveRecord::Base
|
|||
# added by fq
|
||||
has_one :journal_reply
|
||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
attr_accessor :indice
|
||||
|
||||
|
@ -46,7 +48,7 @@ class Journal < ActiveRecord::Base
|
|||
before_create :split_private_notes
|
||||
|
||||
# fq
|
||||
after_save :act_as_activity,:be_user_score
|
||||
after_save :act_as_activity,:be_user_score,:act_as_forge_activity
|
||||
# end
|
||||
#after_destroy :down_user_score
|
||||
#before_save :be_user_score
|
||||
|
@ -156,6 +158,15 @@ class Journal < ActiveRecord::Base
|
|||
end
|
||||
# end
|
||||
|
||||
# Time 2015-02-27 13:30:19
|
||||
# Author lizanle
|
||||
# Description 公共表中需要保存一份该记录
|
||||
def act_as_forge_activity
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.user_id,
|
||||
:project_id => self.issue.project.id)
|
||||
|
||||
end
|
||||
|
||||
# 更新用户分数 -by zjc
|
||||
def be_user_score
|
||||
#新建了缺陷留言且留言不为空,不为空白
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
class JournalsForMessage < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include UserScoreHelper
|
||||
include ExpireHelper
|
||||
safe_attributes "jour_type", # 留言所属类型
|
||||
"jour_id", # 留言所属类型的id
|
||||
"notes", # 留言内容
|
||||
|
@ -55,9 +54,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
|
||||
validates :notes, presence: true
|
||||
after_create :act_as_activity ,:expire_activitie_cache#huang
|
||||
after_update :expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
after_create :act_as_activity #huang
|
||||
after_create :reset_counters!
|
||||
after_destroy :reset_counters!
|
||||
after_save :be_user_score
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
class Memo < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include UserScoreHelper
|
||||
include ExpireHelper
|
||||
belongs_to :forum
|
||||
belongs_to :author, :class_name => "User", :foreign_key => 'author_id'
|
||||
|
||||
after_create :expire_cache
|
||||
after_update :expire_cache
|
||||
before_destroy :expire_cache
|
||||
validates_presence_of :author_id, :forum_id, :subject,:content
|
||||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
|
@ -174,8 +169,5 @@ class Memo < ActiveRecord::Base
|
|||
update_memo_number(User.current,1)
|
||||
update_replay_for_memo(User.current,1)
|
||||
end
|
||||
def expire_cache
|
||||
expire_forum_cache
|
||||
expire_activitie_cache
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
class Message < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include UserScoreHelper
|
||||
include ExpireHelper
|
||||
belongs_to :board
|
||||
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||||
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
||||
|
@ -29,6 +28,8 @@ class Message < ActiveRecord::Base
|
|||
|
||||
# added by fq
|
||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
|
||||
acts_as_searchable :columns => ['subject', 'content'],
|
||||
|
@ -59,13 +60,12 @@ class Message < ActiveRecord::Base
|
|||
validates_length_of :subject, :maximum => 255
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
after_create :add_author_as_watcher, :reset_counters!,:expire_activitie_cache
|
||||
after_update :update_messages_board,:expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
after_create :add_author_as_watcher, :reset_counters!
|
||||
after_update :update_messages_board
|
||||
after_destroy :reset_counters!,:down_user_score
|
||||
|
||||
# fq
|
||||
after_create :act_as_activity,:be_user_score
|
||||
after_create :act_as_activity,:be_user_score,:act_as_forge_activity
|
||||
#before_save :be_user_score
|
||||
# end
|
||||
|
||||
|
@ -160,6 +160,17 @@ class Message < ActiveRecord::Base
|
|||
end
|
||||
# end
|
||||
|
||||
# Time 2015-02-27 14:32:25
|
||||
# Author lizanle
|
||||
# Description
|
||||
def act_as_forge_activity
|
||||
# 如果project为空,那么就是课程相关的消息
|
||||
if !self.board.project.nil?
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||
:project_id => self.board.project.id)
|
||||
end
|
||||
end
|
||||
|
||||
#更新用户分数 -by zjc
|
||||
def be_user_score
|
||||
#新建message且无parent的为发帖
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
class News < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include ExpireHelper
|
||||
belongs_to :project
|
||||
#added by nwb
|
||||
belongs_to :course
|
||||
|
@ -25,7 +24,9 @@ class News < ActiveRecord::Base
|
|||
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
|
||||
# fq
|
||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
#end
|
||||
# 被ForgeActivity虚拟关联
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
# end
|
||||
|
||||
validates_presence_of :title, :description
|
||||
validates_length_of :title, :maximum => 60
|
||||
|
@ -46,11 +47,8 @@ class News < ActiveRecord::Base
|
|||
|
||||
after_create :add_author_as_watcher
|
||||
# fq
|
||||
after_create :act_as_activity
|
||||
after_create :act_as_activity,:act_as_forge_activity
|
||||
# end
|
||||
after_create :expire_activitie_cache
|
||||
after_update :expire_activitie_cache
|
||||
before_destroy :expire_activitie_cache
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
includes(:project).where(Project.allowed_to_condition(args.shift || User.current, :view_news, *args))
|
||||
|
@ -96,5 +94,15 @@ class News < ActiveRecord::Base
|
|||
self.acts << Activity.new(:user_id => self.author_id)
|
||||
end
|
||||
|
||||
# Time 2015-02-27 15:48:17
|
||||
# Author lizanle
|
||||
# Description 公用表中也要记录
|
||||
def act_as_forge_activity
|
||||
# 如果是project为空,那么是课程相关的,不需要保存
|
||||
if !self.project.nil?
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||
:project_id => self.project.id)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class Organization < ActiveRecord::Base
|
||||
attr_accessible :logo_link, :name
|
||||
|
||||
has_many :projects
|
||||
end
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
class Project < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
include ExpireHelper
|
||||
ProjectType_project = 0
|
||||
ProjectType_course = 1
|
||||
|
||||
|
@ -90,7 +89,9 @@ class Project < ActiveRecord::Base
|
|||
:association_foreign_key => 'custom_field_id'
|
||||
|
||||
has_many :tags, :through => :project_tags, :class_name => 'Tag'
|
||||
has_many :project_tags, :class_name => 'ProjectTags'
|
||||
has_many :project_tags, :class_name => 'ProjectTags'
|
||||
|
||||
belongs_to :organization
|
||||
|
||||
# has_many :journals
|
||||
|
||||
|
@ -130,9 +131,8 @@ class Project < ActiveRecord::Base
|
|||
#ActiveModel::Dirty 这里有一个changed方法。对任何对象都可以用
|
||||
after_save :update_inherited_members, :if => Proc.new {|project| project.inherit_members_changed?}
|
||||
# 创建project之后默认创建一个board,之后的board去掉了board的概念
|
||||
after_create :create_board_sync,:expire_project_cache
|
||||
after_update :expire_project_cache
|
||||
before_destroy :delete_all_members,:expire_project_cache
|
||||
after_create :create_board_sync
|
||||
before_destroy :delete_all_members
|
||||
def remove_references_before_destroy
|
||||
return if self.id.nil?
|
||||
Watcher.delete_all ['watchable_id = ?', id]
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class Tracker < ActiveRecord::Base
|
||||
|
||||
# Time 2015-02-6 09:34:44
|
||||
# Author lizanle
|
||||
# Description freeze方法让字符串不可变
|
||||
CORE_FIELDS_UNDISABLABLE = %w(project_id tracker_id subject description priority_id is_private).freeze
|
||||
# Fields that can be disabled
|
||||
# Other (future) fields should be appended, not inserted!
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_organization_new), new_organization_path, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%=l(:label_organization_list)%>
|
||||
</h3>
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<%=l(:label_organization)%>
|
||||
</th>
|
||||
<th>
|
||||
<%=l(:field_created_on)%>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @organizations.each do |org|%>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td style="text-align:center;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=org.name%>'>
|
||||
<span>
|
||||
<%= link_to org.name,home_path(:organization => org.id) %>
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= format_date(org.created_at) %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to(l(:button_change), edit_organization_path(org.id), :class => 'icon icon-copy') %>
|
||||
<%= link_to(l(:button_delete), organization_path(org.id), :method => :delete,:confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
|
@ -2,16 +2,25 @@
|
|||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h3><%=l(:label_project_plural)%></h3>
|
||||
<h3>
|
||||
<%=l(:label_project_plural)%>
|
||||
</h3>
|
||||
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<fieldset><legend><%= l(:label_filter_plural) %></legend>
|
||||
<label for='status'><%= l(:field_status) %> :</label>
|
||||
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
||||
<label for='name'><%= l(:label_project) %>:</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= l(:label_filter_plural) %>
|
||||
</legend>
|
||||
<label for='status'>
|
||||
<%= l(:field_status) %> :
|
||||
</label>
|
||||
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
||||
<label for='name'>
|
||||
<%= l(:label_project) %>:
|
||||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
@ -19,17 +28,31 @@
|
|||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead><tr>
|
||||
<th><%=l(:label_project)%></th>
|
||||
<th><%=l(:field_is_public)%></th>
|
||||
<th><%=l(:field_created_on)%></th>
|
||||
<th>
|
||||
<%=l(:label_project)%>
|
||||
</th>
|
||||
<th>
|
||||
<%=l(:field_is_public)%>
|
||||
</th>
|
||||
<th>
|
||||
<%=l(:field_created_on)%>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% project_tree(@projects) do |project, level| %>
|
||||
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'><span><%= link_to_project_settings(project, {}) %></span></td>
|
||||
<td align="center"><%= checked_image project.is_public? %></td>
|
||||
<td align="center"><%= format_date(project.created_on) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=project.name%>'>
|
||||
<span>
|
||||
<%= link_to_project_settings(project, {}) %>
|
||||
</span>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= checked_image project.is_public? %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= format_date(project.created_on) %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
|
||||
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<% project = project %>
|
||||
<span class="add_attachment" style="font-weight:normal;">
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
|
@ -41,7 +42,7 @@
|
|||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:upload_path => uploads_path(:format => 'js',:project =>project),
|
||||
:description_placeholder => l(:label_optional_description)
|
||||
} %>
|
||||
<span id="upload_file_count">
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
</script>
|
||||
<div id="add-message" class="add_frame" style="display:none;">
|
||||
<% if User.current.logged? %>
|
||||
<h3>
|
||||
<%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %>
|
||||
</h3>
|
||||
s
|
||||
<div class="add_frame_header">
|
||||
<%= l(:label_message_new) %>
|
||||
</div>
|
||||
|
@ -27,8 +25,8 @@
|
|||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<div class="borad-title">
|
||||
<%= h @board.name %>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= h @board.name %></h2>
|
||||
</div>
|
||||
|
||||
<% if !User.current.logged? %>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<h3><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%=l(:label_document_plural)%></h2>
|
||||
</div>
|
||||
<div class="contextual">
|
||||
<!--Moved by young-->
|
||||
<%= l(:label_documents_sort) %>
|
||||
|
@ -8,24 +11,22 @@
|
|||
|
|
||||
<!--Ended by young-->
|
||||
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-document" style="display:none;">
|
||||
<h3>
|
||||
<%=l(:label_document_new)%>
|
||||
</h3>
|
||||
<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<p>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<h3>
|
||||
<%=l(:label_document_new)%>
|
||||
</h3>
|
||||
<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<p>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h3><%=l(:label_document_plural)%></h3>
|
||||
|
||||
<% if @grouped.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%=h @document.title %></h2>
|
||||
</div>
|
||||
<div class="frame-wiki">
|
||||
|
||||
<div class="contextual">
|
||||
|
@ -9,7 +12,6 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2 style="word-wrap: break-word; word-break: normal;"><%=h @document.title %></h2>
|
||||
|
||||
<p><em><%#=h @document.category.name %><br />
|
||||
<%= format_date @document.created_on %></em></p>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
</p>
|
||||
|
||||
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||||
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,250 @@
|
|||
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
|
||||
<div id="resource_list">
|
||||
<% if @isproject %>
|
||||
<%= render :partial => 'project_file', locals: {project: @project} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'course_file', locals: {course: @course} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var slideHeight = 29;
|
||||
function readmore(aNode) {
|
||||
// console.log(aNode)
|
||||
// var $td_tags_area = $(aNode).parent().parent();
|
||||
var $td_tags_area = $(aNode).parent().parent().parent().parent();
|
||||
var $tags_area = $td_tags_area.find('.tags_area')
|
||||
var $tags_gradint = $td_tags_area.find('.tags_gradint')
|
||||
var $read_more = $td_tags_area.find('.read-more')
|
||||
var $read_more_a = $td_tags_area.find('.read-more a')
|
||||
var $tags = $td_tags_area.find('#tags')
|
||||
var $icona = $td_tags_area.find('.tags_icona')
|
||||
|
||||
var slideHeight = 13; //px
|
||||
var defHeight = $tags.height();
|
||||
|
||||
var curHeight = $tags_area.height();
|
||||
if (curHeight == slideHeight) {
|
||||
$tags_area.animate({
|
||||
height: defHeight
|
||||
}, 'normal');
|
||||
$read_more_a.html('隐藏');
|
||||
$icona.html('<%=image_tag "/images/sidebar/minus.png"%>')
|
||||
$tags_gradint.fadeOut();
|
||||
} else {
|
||||
$tags_area.animate({
|
||||
height: slideHeight
|
||||
}, 'normal');
|
||||
$read_more_a.html('更多');
|
||||
$icona.html('<%=image_tag "/images/sidebar/add.png"%>')
|
||||
$tags_gradint.fadeIn();
|
||||
}
|
||||
;
|
||||
|
||||
}
|
||||
$(function () {
|
||||
var slideHeight = 20; //px
|
||||
var defHeight = $('.tags_area').height();
|
||||
if (defHeight >= slideHeight) {
|
||||
$('.tags_area').css('height', slideHeight + 'px');
|
||||
}
|
||||
;
|
||||
});
|
||||
|
||||
function eval_ajax(xhr, textStatus) {
|
||||
if (textStatus == 'success') {
|
||||
eval(xhr.responseText);
|
||||
} else if (textStatus == 'error') {
|
||||
alert('error');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function attachment_contenttypes_searchex(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
|
||||
|
||||
function attachtype_edit(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function attachmenttypes_searchex(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: encodeURIComponent(value),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function course_attachmenttypes_searchex(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: encodeURIComponent(value),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function course_attachment_contenttypes_searchex(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
function course_attachtype_edit(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function attachmenttypes_change(id, type) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=updateType_attachments_path%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
|
||||
if (textStatus == 'success') {
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
}).error(function () {
|
||||
alert('error');
|
||||
});
|
||||
} else if (textStatus == 'error') {
|
||||
alert('An error has occurred');
|
||||
}
|
||||
});
|
||||
<%end%>
|
||||
|
||||
}
|
||||
|
||||
function course_attachmenttypes_change(id, type) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=updateType_attachments_path%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
|
||||
if (textStatus == 'success') {
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
}).error(function () {
|
||||
alert('error');
|
||||
});
|
||||
} else if (textStatus == 'error') {
|
||||
alert('An error has occurred');
|
||||
}
|
||||
});
|
||||
<%end%>
|
||||
|
||||
}
|
||||
|
||||
// 编辑文件密级
|
||||
function file_dense_edit(id, type) {
|
||||
$.ajax({
|
||||
url: '<%=updateFileDense_attachments_path%>',
|
||||
type: "POST",
|
||||
remote:"true",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script type='text/javascript'>
|
||||
function tagAddClick(divid, objId, objTag) {
|
||||
alert("OK");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/users/tag_saveEx',
|
||||
data: {
|
||||
tagname: $('tag_name').value,
|
||||
obj_id: encodeURIComponent(objId),
|
||||
obj_flag: encodeURIComponent(objTag)
|
||||
},
|
||||
success: function (data, textStatus) {
|
||||
alert("OK");
|
||||
$(divid).empty();
|
||||
$(divid).html('123');
|
||||
$("#" + divid + " #name").val("");
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
<% attachmenttypes = @project.attachmenttypes %>
|
||||
<% sufixtypes = @project.contenttypes %>
|
||||
|
||||
<span class="borad-title">
|
||||
<%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>
|
||||
资源共享区
|
||||
</span>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">资源共享区</h2>
|
||||
</div>
|
||||
|
||||
<div class="content-title-top">
|
||||
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
||||
|
|
|
@ -1,250 +1 @@
|
|||
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
|
||||
<div id="resource_list">
|
||||
<% if @isproject %>
|
||||
<%= render :partial => 'project_file', locals: {project: @project} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'course_file', locals: {course: @course} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var slideHeight = 29;
|
||||
function readmore(aNode) {
|
||||
// console.log(aNode)
|
||||
// var $td_tags_area = $(aNode).parent().parent();
|
||||
var $td_tags_area = $(aNode).parent().parent().parent().parent();
|
||||
var $tags_area = $td_tags_area.find('.tags_area')
|
||||
var $tags_gradint = $td_tags_area.find('.tags_gradint')
|
||||
var $read_more = $td_tags_area.find('.read-more')
|
||||
var $read_more_a = $td_tags_area.find('.read-more a')
|
||||
var $tags = $td_tags_area.find('#tags')
|
||||
var $icona = $td_tags_area.find('.tags_icona')
|
||||
|
||||
var slideHeight = 13; //px
|
||||
var defHeight = $tags.height();
|
||||
|
||||
var curHeight = $tags_area.height();
|
||||
if (curHeight == slideHeight) {
|
||||
$tags_area.animate({
|
||||
height: defHeight
|
||||
}, 'normal');
|
||||
$read_more_a.html('隐藏');
|
||||
$icona.html('<%=image_tag "/images/sidebar/minus.png"%>')
|
||||
$tags_gradint.fadeOut();
|
||||
} else {
|
||||
$tags_area.animate({
|
||||
height: slideHeight
|
||||
}, 'normal');
|
||||
$read_more_a.html('更多');
|
||||
$icona.html('<%=image_tag "/images/sidebar/add.png"%>')
|
||||
$tags_gradint.fadeIn();
|
||||
}
|
||||
;
|
||||
|
||||
}
|
||||
$(function () {
|
||||
var slideHeight = 20; //px
|
||||
var defHeight = $('.tags_area').height();
|
||||
if (defHeight >= slideHeight) {
|
||||
$('.tags_area').css('height', slideHeight + 'px');
|
||||
}
|
||||
;
|
||||
});
|
||||
|
||||
function eval_ajax(xhr, textStatus) {
|
||||
if (textStatus == 'success') {
|
||||
eval(xhr.responseText);
|
||||
} else if (textStatus == 'error') {
|
||||
alert('error');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function attachment_contenttypes_searchex(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
|
||||
|
||||
function attachtype_edit(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function attachmenttypes_searchex(value) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: encodeURIComponent(value),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function course_attachmenttypes_searchex(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: encodeURIComponent(value),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function course_attachment_contenttypes_searchex(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
function course_attachtype_edit(value) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: encodeURIComponent(value)
|
||||
}
|
||||
|
||||
}).complete(eval_ajax);
|
||||
<%end%>
|
||||
}
|
||||
|
||||
function attachmenttypes_change(id, type) {
|
||||
<% if @project%>
|
||||
$.ajax({
|
||||
url: '<%=updateType_attachments_path%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
|
||||
if (textStatus == 'success') {
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_project_files_path(project_id: @project)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
}).error(function () {
|
||||
alert('error');
|
||||
});
|
||||
} else if (textStatus == 'error') {
|
||||
alert('An error has occurred');
|
||||
}
|
||||
});
|
||||
<%end%>
|
||||
|
||||
}
|
||||
|
||||
function course_attachmenttypes_change(id, type) {
|
||||
<% if @course%>
|
||||
$.ajax({
|
||||
url: '<%=updateType_attachments_path%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
|
||||
if (textStatus == 'success') {
|
||||
$.ajax({
|
||||
url: '<%=getattachtype_course_files_path(course_id: @course)%>',
|
||||
type: "POST",
|
||||
data: {
|
||||
type: $('#attachment_browse').val(),
|
||||
contentType: $('#attach_sufix_browse').val()
|
||||
}
|
||||
}).error(function () {
|
||||
alert('error');
|
||||
});
|
||||
} else if (textStatus == 'error') {
|
||||
alert('An error has occurred');
|
||||
}
|
||||
});
|
||||
<%end%>
|
||||
|
||||
}
|
||||
|
||||
// 编辑文件密级
|
||||
function file_dense_edit(id, type) {
|
||||
$.ajax({
|
||||
url: '<%=updateFileDense_attachments_path%>',
|
||||
type: "POST",
|
||||
remote:"true",
|
||||
data: {
|
||||
attachmentid: encodeURIComponent(id),
|
||||
newtype: encodeURIComponent(type)
|
||||
}
|
||||
|
||||
}).complete(function (xhr, textStatus) {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script type='text/javascript'>
|
||||
function tagAddClick(divid, objId, objTag) {
|
||||
alert("OK");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/users/tag_saveEx',
|
||||
data: {
|
||||
tagname: $('tag_name').value,
|
||||
obj_id: encodeURIComponent(objId),
|
||||
obj_flag: encodeURIComponent(objTag)
|
||||
},
|
||||
success: function (data, textStatus) {
|
||||
alert("OK");
|
||||
$(divid).empty();
|
||||
$(divid).html('123');
|
||||
$("#" + divid + " #name").val("");
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<%= render :partial => 'files/newfile_index' %>
|
|
@ -0,0 +1,2 @@
|
|||
alert("eeee");
|
||||
$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
|
|
@ -1,4 +1,6 @@
|
|||
<h3><%=l(:label_attachment_new)%></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%=l(:label_attachment_new)%></h2>
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<%= form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<% @gantt.view = self %>
|
||||
<h3><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><% @gantt.view = self %>
|
||||
<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||
:project_id => @project, :month => params[:month],
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">问题跟踪</h2>
|
||||
</div>
|
||||
<div class="problem_top">
|
||||
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
|
||||
<span>
|
||||
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
|
||||
: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 true || User.current.logged? %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="problem_p fr">问题总数:<span>100</span> 未解决:<span>20</span></span>
|
||||
</div>
|
||||
<div class="contextual">
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
<div style="clear:right; ">
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
|
||||
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
||||
<span>---<%= l :label_query_new %>---</span>
|
||||
|
||||
<div id="query_form_content" class="hide-when-print">
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_issue_query_condition) %>
|
||||
</legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_options) %>
|
||||
</legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><%= l(:field_column_names) %></td>
|
||||
<td><%= render_query_columns_selection(@query) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
|
||||
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= l(:button_show) %></td>
|
||||
<td><%= available_block_columns_tags(@query) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
-->
|
||||
<div class="buttons hide-when-print">
|
||||
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
||||
<div class="pagination">
|
||||
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="float: right; padding-top: 30px">
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
||||
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
||||
<%= f.link_to 'PDF', :url => params %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<p>
|
||||
<label>
|
||||
<%= radio_button_tag 'columns', 'all' %>
|
||||
<%= l(:description_all_columns) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||
<%= l(:field_description) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
|
@ -1,135 +1 @@
|
|||
<div class="content-title-top">
|
||||
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
|
||||
<div>
|
||||
<%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
|
||||
: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 true || User.current.logged? %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="contextual">
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
<div style="clear:right; ">
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
|
||||
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
||||
<span>---<%= l :label_query_new %>---</span>
|
||||
|
||||
<div id="query_form_content" class="hide-when-print">
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_issue_query_condition) %>
|
||||
</legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_options) %>
|
||||
</legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><%= l(:field_column_names) %></td>
|
||||
<td><%= render_query_columns_selection(@query) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
|
||||
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= l(:button_show) %></td>
|
||||
<td><%= available_block_columns_tags(@query) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
-->
|
||||
<div class="buttons hide-when-print">
|
||||
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
||||
<div class="pagination">
|
||||
<ul><%= pagination_links_full @issue_pages, @issue_count %></ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="float: right; padding-top: 30px">
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
||||
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
||||
<%= f.link_to 'PDF', :url => params %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<p>
|
||||
<label>
|
||||
<%= radio_button_tag 'columns', 'all' %>
|
||||
<%= l(:description_all_columns) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||
<%= l(:field_description) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
<%= render :partial => 'issues/newissue_index' %>
|
|
@ -0,0 +1 @@
|
|||
$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
|
|
@ -1,3 +1,6 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">问题跟踪</h2>
|
||||
</div>
|
||||
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
|
||||
|
||||
<%= labelled_form_for @issue, :url => project_issues_path(@project),
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">问题跟踪</h2>
|
||||
</div>
|
||||
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
|
||||
<% html_title "#{@issue.tracker.name} #{@issue.source_from}: #{@issue.subject}" %>
|
||||
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
|
||||
|
||||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
|
@ -87,7 +89,7 @@ end %>
|
|||
<%= render_custom_fields_rows(@issue) %>
|
||||
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</table>
|
||||
|
||||
woca
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<hr />
|
||||
<% if @issue.description? %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
paginator: the paginator that renders the pagination tags inside
|
||||
-%>
|
||||
<%= paginator.render do -%>
|
||||
<div class="pagination">
|
||||
<div id="paginator" class="pagination">
|
||||
<%= first_page_tag unless current_page.first? %>
|
||||
<%= prev_page_tag unless current_page.first? %>
|
||||
<% each_page do |page| -%>
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
<style type="text/css">
|
||||
#scrollsidebar{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
#scrollsidebar{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#F6F7F8; font-style:normal;}
|
||||
#scrollsidebar div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ }
|
||||
#scrollsidebar div,img,tr,td,table{ border:0;}
|
||||
#scrollsidebar ol,ul,li{ list-style-type:none}
|
||||
#scrollsidebar .cl{ clear:both; overflow:hidden; }
|
||||
#scrollsidebar a{ text-decoration:none;}
|
||||
|
||||
html{ overflow-x:hidden;}
|
||||
.custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;}
|
||||
.scrollsidebar{position:absolute; z-index:999; top:150px;background:none !important;}
|
||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||
.side_content .side_list {width:154px;overflow:hidden;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; margin-top:50px; float:left; cursor:pointer;}
|
||||
.show_btn span { display:none;}
|
||||
.close_btn{width:24px;height:24px;cursor:pointer;}
|
||||
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat;}
|
||||
.side_title {height:46px;}
|
||||
.side_bottom { height:8px;}
|
||||
.side_center {font-family:Verdana, Geneva, sans-serif; padding:5px 12px; font-size:12px;}
|
||||
.close_btn { float:right; display:block; width:21px; height:16px; margin:16px 10px 0 0; _margin:16px 5px 0 0;}
|
||||
.close_btn span { display:none;}
|
||||
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
||||
.msgserver { margin:10px 0 4px 4px;}
|
||||
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -115px; padding-left:22px;}
|
||||
.opnionText{ width:120px; height:180px; border-color:#cecece; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; color:#999; padding:3px;}
|
||||
a.opnionButton{ display:block; font-weight: bold; margin:-25px auto 0; text-align:center;}
|
||||
a:hover.opnionButton{ text-decoration:underline;}
|
||||
|
||||
html{ overflow-x:hidden;}
|
||||
.scrollsidebar{ position:absolute;top:1px; right:1px; background:none; }
|
||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||
.side_content .side_list {width:154px;overflow:hidden;}
|
||||
.show_btn{ width:0; height:112px; overflow:hidden; float:left; cursor:pointer;}
|
||||
.show_btn span { display:none;}
|
||||
.close_btn{width:24px;height:24px;cursor:pointer;}
|
||||
.side_title,.side_bottom,.close_btn,.show_btn {background:url(/images/sidebar_bg.png) no-repeat; }
|
||||
.side_title {height:35px;}
|
||||
.side_bottom { height:8px;}
|
||||
.side_center {font-family:Verdana, Geneva, sans-serif; padding:0px 12px; font-size:12px;}
|
||||
.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;}
|
||||
.close_btn span { display:none;}
|
||||
.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;}
|
||||
.msgserver { margin:2px 0px 0px 4px; padding-top: 0px}
|
||||
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -115px; padding-left:22px;}
|
||||
.opnionText{ width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;}
|
||||
.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;}
|
||||
.opnionButton:hover{background: #0fa9bb; }
|
||||
|
||||
/* blue skin as the default skin */
|
||||
.side_title {background-position:-195px 0;}
|
||||
|
@ -87,21 +85,6 @@ a:hover.opnionButton{ text-decoration:underline;}
|
|||
show_btn.css('width', 25);
|
||||
|
||||
}
|
||||
//???????
|
||||
if(options.skin) thisBox.addClass('side_'+options.skin);
|
||||
|
||||
|
||||
//????scroll???
|
||||
$(window).bind("scroll",function(){
|
||||
var offsetTop = defaultTop + $(window).scrollTop() + "px";
|
||||
thisBox.animate({
|
||||
top: offsetTop
|
||||
},
|
||||
{
|
||||
duration: options.durationTime,
|
||||
queue: false //???????????????????
|
||||
});
|
||||
});
|
||||
//close???
|
||||
closeBtn.bind("click",function(){
|
||||
sideContent.animate({width: '0px'},"fast");
|
||||
|
@ -186,14 +169,12 @@ function cookieget(n)
|
|||
<%= f.text_area :subject, :class => "opnionText",:placeholder => "有什么想说的,尽管来咆哮吧~~"%>
|
||||
<%= f.hidden_field :content, :required => true ,:value=>'该贴来自用户反馈!'%>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fd6e2a;" id="" onclick="f_submit();">提 交</a>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();">提 交</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="msgserver">
|
||||
<p>
|
||||
<a href="http://user.trustie.net/users/12/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>黄井泉</a></br>
|
||||
<a href="http://user.trustie.net/users/12/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>黄井泉</a>
|
||||
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side_bottom"></div>
|
||||
|
|
|
@ -40,18 +40,15 @@
|
|||
</div>
|
||||
<div class="debug">
|
||||
<%= debug(params) if Rails.env.development? %>
|
||||
<div class="hidden">
|
||||
<script>
|
||||
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-46523987-1', 'trustie.net');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?67e9738474be83f55f1233001a6ac34e";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,22 +1,16 @@
|
|||
<div style="margin-left: 20px;">
|
||||
|
||||
<div class="pr_info_join fl">
|
||||
<!--关注项目-->
|
||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %> <!--added by linchun-->
|
||||
<span class="icon-fav icon"></span><%= watcher_link(@project, User.current) %>
|
||||
<span><%= watcher_link(@project, User.current) %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--添加项目申请-->
|
||||
<div style="margin-left: 20px;">
|
||||
<!--加入项目 -->
|
||||
<% if ( !(User.current.member_of? @project) && User.current.login?) %>
|
||||
<span class="icon-fav icon"></span>
|
||||
<%= applied_link(@project, User.current) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--添加退出项目-->
|
||||
<div style="margin-left: 20px;">
|
||||
<% if ((User.current.member_of? @project) &&
|
||||
User.current.login? &&
|
||||
Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s != "Manager") %>
|
||||
<!--退出项目-->
|
||||
<% if ((User.current.member_of? @project) &&
|
||||
User.current.login? &&
|
||||
Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s != "Manager") %>
|
||||
<%= exit_project_link(@project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
<%#@nav_dispaly_project_label = 1 %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -24,171 +23,171 @@
|
|||
<body class="<%= h body_css_classes %>">
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<%=render :partial => 'layouts/base_header'%>
|
||||
<div id="wrapper3">
|
||||
<%= render :partial => 'layouts/base_header'%>
|
||||
<div id="main">
|
||||
<div class="top-content">
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px;" rowspan="2">
|
||||
<a href="http://<%= Setting.host_name%>" style="color: #15bccf;">
|
||||
软件项目托管社区
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 430px; color: #15bccf">
|
||||
<strong><%= l(:label_user_location) %> : </strong>
|
||||
</td>
|
||||
<td class="info_font" style="width: 240px;" rowspan="2"><a href="http://<%= Setting.host_name%>" style="color: #15bccf;"> 软件项目托管社区 </a></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
<script type="text/javascript">
|
||||
function regexName()
|
||||
{
|
||||
var name = $.trim($("#name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#project_name_span").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#project_name_span").css('color','#ff0000');
|
||||
$("#project_name_span").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
<div class="top-content-search">
|
||||
<script type="text/javascript">
|
||||
function regexName()
|
||||
{
|
||||
var name = $.trim($("#name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#project_name_span").text("<%= l(:label_search_conditions_not_null) %>
|
||||
");
|
||||
$("#project_name_span").css('color','#ff0000');
|
||||
$("#project_name_span").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#project_name_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#project_search_form").submit();}
|
||||
}
|
||||
</script>
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
<span id="project_name_span" style="float: left"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#project_search_form").submit();}
|
||||
}
|
||||
</script>
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" > <%= l(:label_search)%> </a>
|
||||
<br />
|
||||
<span id="project_name_span" style="float: left"></span>
|
||||
<% end %>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="top-content-list">
|
||||
<%=link_to l(:label_home),home_path %> >
|
||||
<%=link_to @project, project_path(@project) %>
|
||||
</p>
|
||||
</td>
|
||||
<p class="top-content-list">
|
||||
<%= link_to l(:label_home),home_path %> >
|
||||
<%= link_to @project, project_path(@project) %>
|
||||
</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
<!-- 左边侧栏内容 -->
|
||||
<div id="sidebar">
|
||||
<div class="spaceleft">
|
||||
<div class="inf_user_image">
|
||||
<% @project = Project.find_by_id(@project.id)%>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<%= image_tag(url_to_avatar(@project), :class => 'avatar2') %>
|
||||
</td>
|
||||
<td>
|
||||
<% project_score = format("%.2f" ,project_scores(@project)).to_i%>
|
||||
<div class="info-course">
|
||||
<%= link_to @project.name, project_path(@project)%>
|
||||
</div>
|
||||
<div>
|
||||
<% if @project.project_type == 0 && project_score != 0 %>
|
||||
<%= l(:label_project_grade)%> :
|
||||
<%= link_to(project_score, {:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :style => "color: #EC6300;")%>
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
</div>
|
||||
<div id="join_exit_project_div">
|
||||
<%= render 'layouts/join_exit_project' %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(".subNav").click(function() {
|
||||
$(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd")
|
||||
$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
|
||||
|
||||
<div class="user_fans">
|
||||
<table width="240" border="0">
|
||||
<tr align="center" width="80px">
|
||||
<% files_count = @project.attachments.count %>
|
||||
<% @project.versions.each do |version| %>
|
||||
<% files_count += version.attachments.count %>
|
||||
<% end %>
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@project.members.count}", project_member_path(@project) %>
|
||||
</td>
|
||||
<td class="font_index">
|
||||
<%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %>
|
||||
</td>
|
||||
<!-- 项目sidebar栏显示问题数目为项目总问题数排除已关闭和已解决的项目问题数,即排除3(已解决),5(已关闭)的 项目问题数 !-->
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@project.issues.where('status_id in (1,2,4,6)').count}/#{@project.issues.count}", project_issues_path(@project) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="font_aram">
|
||||
<td align="center" width="70px">
|
||||
<%= l(:label_member) %>
|
||||
</td>
|
||||
<td align="center" width="100px">
|
||||
<%= l(:label_user_watchered) %>
|
||||
</td>
|
||||
<td align="center" width="70px">
|
||||
<%= l(:label_project_issues) %>
|
||||
</td>
|
||||
<!-- <td align="center" width="58px"><%#= l(:label_attachment) %></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
<div class="user_underline"></div>
|
||||
</div>
|
||||
<div class="inf_user_context">
|
||||
<div class="font_title_left">
|
||||
<%= l(:label_project_overview) %>
|
||||
// 修改数字控制速度, slideUp(500)控制卷起速度
|
||||
$(this).next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<div class="project_left">
|
||||
<div class="project_info">
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<%= image_tag(url_to_avatar(@project), :style => 'width:61px; height:61px;') %>
|
||||
</div>
|
||||
<div style="padding-bottom: 8px">
|
||||
<div class="font_lighter_sidebar" style="word-break:break-all;word-wrap: break-word;">
|
||||
<%= textilizable @project.description %>
|
||||
</div>
|
||||
<div class="created_on_project">
|
||||
<strong style="color: #15bccf">
|
||||
<%= l(:label_create_time) %>:
|
||||
</strong>
|
||||
<%= format_time(@project.created_on) %>
|
||||
</div>
|
||||
<div class="pr_info_id fl mb5">
|
||||
ID:<%= @project.id %>
|
||||
</div>
|
||||
<div class="user_underline"></div>
|
||||
</div>
|
||||
<!--tags-->
|
||||
<div class="user_fans">
|
||||
<!-- added by william -for tag -->
|
||||
<div class="user_tags">
|
||||
<div id="tags">
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => @project,:object_flag => "2"}%>
|
||||
</div>
|
||||
<!--关注、申请加入/退出项目-->
|
||||
<div id="join_exit_project_div">
|
||||
<%= render 'layouts/join_exit_project' %>
|
||||
</div>
|
||||
<!-- 项目得分 -->
|
||||
<div class="cl"></div>
|
||||
<div class="pr_info_name><%= link_to @project.name, project_path(@project) %><span class="img_private ">私有</span></div>
|
||||
<div class="cl"></div>
|
||||
<div class="pr_info_score">
|
||||
<% if @project.project_type == 0 %>
|
||||
<%= l(:label_project_grade)%> :
|
||||
<%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id },
|
||||
:style => "color: #EC6300;")%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pr_info_foot">
|
||||
<%= l(:label_member) %>(<a class="info_foot_num" href="#" target="_blank"><%= link_to "#{@project.members.count}", project_member_path(@project) %></a>)
|
||||
<span>| </span><%= l(:label_user_watchered) %>(<a class="info_foot_num" href="#" target="_blank"><%= link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %></a>)
|
||||
<span>| </span><%= l(:project_module_attachments) %>(<a class="info_foot_num" href="#" target="_blank"><%= link_to "#{@project.attachments.count}", project_files_path(@project) %></a>)</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--项目信息 end-->
|
||||
|
||||
<div class="subNavBox">
|
||||
<div class="subNav currentDd currentDt subNav_jiantou">邀请</div>
|
||||
<ul class="navContent " style="display:block; padding-left: 0px; margin-top:0px;">
|
||||
<li><a href="#">发送邮件邀请新用户</a></li>
|
||||
<li><a href="#">邀请Trustie注册用户</a></li>
|
||||
</ul>
|
||||
<div class="subNav">
|
||||
<%= link_to "动态", {:controller => 'projects', :action => 'show', :id => @project.id},
|
||||
:remote => "true",
|
||||
:style => "color:#3CA5C6" %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to "问题跟踪", project_issues_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.issues.count %>)</span>
|
||||
<span>
|
||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||
<%= link_to "+发布问题", new_project_issue_path(@project) , :style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to "讨论区", project_boards_path(@project), :style => "color:#3CA5C6" %>
|
||||
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||
<%= link_to "+发贴", new_board_message_path(@project.boards.first, @project), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to "资源库", project_files_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.attachments.count %>)</span>
|
||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||
<%= link_to "+上传资源", new_project_file_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to "版本库", {:controller => 'repositories', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
|
||||
<span class="subnav_num">(<%= @project.repositories.count %>)</span>
|
||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||
<%= link_to "+创建版本库", new_project_repository_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="subNav subNav_jiantou">更多</div>
|
||||
<ul class="navContent" style="padding-left: 0px">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
||||
</div><!--项目侧导航 end-->
|
||||
<div class="cl"></div>
|
||||
<div class="project_intro">
|
||||
<h4 class="project_h4">项目简介:</h4><%= @project.description %>
|
||||
<div class="lg-foot">
|
||||
展开更多信息 <span class="g-arr-down"><img src="/images/new_project/jiantou.jpg" width="12" height="6" /></span>
|
||||
</div>
|
||||
</div><!--项目简介 end-->
|
||||
<div class="project_Label">
|
||||
<h4 class="project_h4">标签:</h4>
|
||||
<div class="tag_h" >
|
||||
<div class="user_tags">
|
||||
<div id="tags">
|
||||
<%= render :partial => 'tags/project_tag', :locals => {:obj => @project,:object_flag => "2"}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
</div>
|
||||
<!--tool-->
|
||||
<div class="user_underline"></div>
|
||||
<div class="tool">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</div>
|
||||
<div class="user_underline"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="tabs_new">
|
||||
<%= render_main_menu(@project) %>
|
||||
</div>
|
||||
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<%= error_messages_for 'project' %>
|
||||
<!--[form:project]-->
|
||||
<% unless @organizations.new_record? %>
|
||||
<p>
|
||||
<%= render :partial=>"avatar/avatar_form",:locals=> {source:@organizations} %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<label for="project_description">
|
||||
<%= l(:label_organization_name)%>:
|
||||
<span class="required"> </span>
|
||||
</label>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:290px;" %>
|
||||
</p>
|
||||
<!--<p>-->
|
||||
<!--<label for="project_description">-->
|
||||
<%#= l(:field_description)%>
|
||||
<!--<span class="required"> </span>-->
|
||||
<!--</label>-->
|
||||
<!--<%#= f.text_area :description, :required => true, :size => 60, :style => "width:490px;" %>-->
|
||||
<!--</p>-->
|
|
@ -0,0 +1,25 @@
|
|||
<%= form_for(@organization) do |f|%>
|
||||
<h3>
|
||||
<%=l(:label_organization_edit)%>
|
||||
</h3>
|
||||
<div class="box tabular" >
|
||||
<%= error_messages_for 'project' %>
|
||||
<p>
|
||||
<%= render :partial=>"avatar/avatar_form",:locals=> {source:@organization} %>
|
||||
</p>
|
||||
<p>
|
||||
<label for="project_description">
|
||||
<%= l(:label_organization_name)%>:
|
||||
<span class="required"> </span>
|
||||
</label>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:290px;" %>
|
||||
</p>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_organization_edit)) -%>
|
|
@ -0,0 +1,31 @@
|
|||
<title>
|
||||
<%= l(:label_all_enterprises) %>
|
||||
</title>
|
||||
<div class="content_syqy">
|
||||
<div class="list">
|
||||
<%= l(:label_all_enterprises) %>
|
||||
</div>
|
||||
<div class="syqy_box">
|
||||
<% if @organizations.empty? %>
|
||||
<h3>
|
||||
<%= l(:label_enterprise_nil) %>
|
||||
</h3>
|
||||
<% else %>
|
||||
<% @organizations.each do |organization| %>
|
||||
<% unless organization.name.blank? %>
|
||||
<ul>
|
||||
<li >
|
||||
<img src="/images/organization_logo.jpg" width="30" height="30" alt="<%= organization.name%>" />
|
||||
<%= link_to organization.name, home_path(:organization => organization.id) %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div class="school-index">
|
||||
<ul id="schoollist" style="line-height: 25px"></ul>
|
||||
</div>
|
||||
<% html_title(l(:label_enterprise_all)) -%>
|
|
@ -0,0 +1,18 @@
|
|||
<%= form_for(@organizations, :method => :post,
|
||||
:name => 'new_form',
|
||||
:url => {:controller => 'organization',
|
||||
:action => 'create'}) do |f|%>
|
||||
<h3>
|
||||
<%=l(:label_organization_new)%>
|
||||
</h3>
|
||||
<div class="box tabular" >
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_organization_new)) -%>
|
|
@ -1,23 +0,0 @@
|
|||
<title><%= l(:label_all_enterprises) %></title>
|
||||
<div class="content_syqy">
|
||||
<div class="list"><%= l(:label_all_enterprises) %></div>
|
||||
<div class="syqy_box">
|
||||
<% if @projects.count == 0 %>
|
||||
<h3><%= l(:label_enterprise_nil) %></h3>
|
||||
<% else %>
|
||||
<% @projects.each do |organization| %>
|
||||
<% unless organization.enterprise_name.blank? %>
|
||||
<ul>
|
||||
<li ><img src="/images/organization_logo.jpg" width="30" height="30" alt="#{project.enterprise_name}" />
|
||||
<%= link_to organization.enterprise_name, home_path(:organization => organization) %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div class="school-index">
|
||||
<ul id="schoollist" style="line-height: 25px"></ul>
|
||||
</div>
|
||||
<% html_title(l(:label_enterprise_all)) -%>
|
|
@ -4,9 +4,14 @@
|
|||
<input type="text" maxlength="100" name="polls_name" id="polls_title" value="<%= @poll.polls_name %>" class="input_title" placeholder="问卷标题"/>
|
||||
</div>
|
||||
<div class="ur_title_editor_prefix">
|
||||
<textarea name="polls_description" maxlength="300" id="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea>
|
||||
<div contenteditable="true" id="polls_description_div" class="ur_textbox" style="min-height: 150px;width: 100%;background-color: #ffffff" onkeyup="edit_head();">
|
||||
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
|
||||
</div>
|
||||
<textarea name="polls_description" maxlength="300" id="polls_description" class="textarea_editor" style="display: none">
|
||||
<%= @poll.polls_description%>
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="ur_editor_footer">
|
||||
<div class="ur_editor_footer" style="padding-top: 10px;">
|
||||
<a class="btn_submit" data-button="ok" onclick="pollsSubmit($(this));">
|
||||
<%= l(:label_button_ok)%>
|
||||
</a>
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
<%#= javascript_include_tag "polls" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
//编辑问卷描述之后
|
||||
function edit_head(){
|
||||
$("#polls_description").val($("#polls_description_div").html());
|
||||
}
|
||||
|
||||
function add_MC(){
|
||||
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MC') %>");
|
||||
$("#poll_questions_title").focus();
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
<h1 class="ur_page_title" id="polls_name_h">
|
||||
<%= poll.polls_name%>
|
||||
</h1>
|
||||
<p class="ur_prefix_content" id="polls_description_p">
|
||||
<%= @poll.polls_description%>
|
||||
</p>
|
||||
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
|
||||
<div class="cl"></div>
|
||||
</div><!--头部显示 end-->
|
|
@ -1,6 +1,6 @@
|
|||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
showModal('ajax-modal', '250px');
|
||||
$('#ajax-modal').css('height','111px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
showModal('ajax-modal', '250px');
|
||||
$('#ajax-modal').css('height','80px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<%= @poll.polls_name%>
|
||||
</h1>
|
||||
<p class="ur_prefix_content">
|
||||
<%= @poll.polls_description %>
|
||||
<%= @poll.polls_description.html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
$("#polls_title").val("<%= @poll.polls_name%>");
|
||||
$("#polls_description").val("<%= @poll.polls_description %>");
|
||||
$("#polls_name_h").html("<%= @poll.polls_name %>");
|
||||
$("#polls_description_p").html("<%= @poll.polls_description %>");
|
||||
$("#polls_head_show").html("<%= escape_javascript(render :partial => 'show_head', :locals => {:poll => @poll}) %>");
|
||||
$("#polls_head_edit").html("<%= escape_javascript(render :partial => 'edit_head', :locals => {:poll => @poll}) %>");
|
||||
$("#polls_head_edit").hide();
|
||||
$("#polls_head_show").show();
|
|
@ -1,35 +1,62 @@
|
|||
<%= error_messages_for 'project' %>
|
||||
<!--[form:project]-->
|
||||
<% unless @project.new_record? %>
|
||||
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
|
||||
<p>
|
||||
<%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p>
|
||||
<p>
|
||||
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %>
|
||||
</p>
|
||||
|
||||
<p style="padding-right: 20px;">
|
||||
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
</p><!--by young-->
|
||||
<p><%= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %></p>
|
||||
<p style="display: none" ><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
|
||||
<p>
|
||||
<%#= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %>
|
||||
<label for="project_description">
|
||||
<%= l(:field_enterprise_name)%>
|
||||
<span class="required"> </span>
|
||||
</label>
|
||||
<%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %>
|
||||
</p>
|
||||
<p style="display: none" >
|
||||
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
|
||||
value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
|
||||
<% unless @project.identifier_frozen? %>
|
||||
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
|
||||
<em class="info">
|
||||
<%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %>
|
||||
<%= l(:text_project_identifier_info).html_safe %>
|
||||
</em>
|
||||
<% end %></p>
|
||||
|
||||
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
||||
<p style="margin-left:-10px;">
|
||||
<em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<%= f.check_box :is_public, :style => "margin-left:10px;" %>
|
||||
</em>
|
||||
</p>
|
||||
<p style="margin-left:-10px;">
|
||||
<em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<%= f.check_box :hidden_repo, :style => "margin-left:10px;" %>
|
||||
</em>
|
||||
</p>
|
||||
<!--
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<%#= f.check_box :dts_test, :style => "margin-left:10px;" %>
|
||||
</em></p>
|
||||
-->
|
||||
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
|
||||
<p style="display:none;">
|
||||
<%= f.text_field :project_type, :value => 0 %>
|
||||
</p>
|
||||
|
||||
<%= wikitoolbar_for 'project_description' %>
|
||||
|
||||
|
||||
<% @project.custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :project, value %></p>
|
||||
<p>
|
||||
<%= custom_field_tag_with_label :project, value %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
|
||||
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">动态</h2>
|
||||
</div>
|
||||
<% if @events_by_day.size >0 %>
|
||||
<div class="content-title-top-avtive">
|
||||
<p class="subtitle">
|
||||
<% # 暂时隐藏时间的显示%>
|
||||
<%#= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
||||
</p>
|
||||
|
||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;margin-top:10px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
|
||||
<% else %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||
<% end %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable e,:event_description %>
|
||||
<%#= h(truncate(strip_tags(e.event_description).gsub(/ /, ' '), length: 30, omission: '...')) %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></span>
|
||||
<% if e.event_type == "issue" %>
|
||||
<div class="" style="display:inline-block;position:absolute; right:2%;">
|
||||
<span> <%= link_to l(:label_find_all_comments), issue_path(e) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count) %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end -%>
|
||||
<% if (@events_pages.page == @events_pages.last_page) %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
(<%= link_to_user(@user, @canShowRealName) %>
|
||||
)
|
||||
<% else %>
|
||||
<%= link_to_user(@user) %>
|
||||
<% end %>
|
||||
<%#= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= l(:label_user_create_project) %> <%= link_to @project.name %>
|
||||
<strong> !</strong>
|
||||
<div class="activity_description info-break" style="font-size: 13px;">
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
(<%= link_to_user(@user, @canShowRealName) %>
|
||||
)
|
||||
<% else %>
|
||||
<%= link_to_user(@user) %>
|
||||
<% end %>
|
||||
<%#= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= l(:label_user_create_project) %> <%= link_to @project.name %>
|
||||
<strong> !</strong>
|
||||
<div class="activity_description info-break" style="font-size: 13px;">
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"><%= l :label_activity_time %>: <%= format_time(@project.created_on) %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= pagination_links_full @events_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
<% html_title(l(:label_overview)) -%>
|
||||
|
|
@ -1,39 +1,27 @@
|
|||
<div class="font_title_left">
|
||||
<%= l(:label_project_tool)%>
|
||||
</div>
|
||||
<li>
|
||||
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
||||
<%= link_to l(:label_settings), settings_project_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_wiki), project_wiki_path(@project) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_code_review), {controller: 'code_review', action: 'index', id: @project.id} %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_documents), project_documents_path(@project) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_module_share) ,share_show_path(@project) %>
|
||||
</li>
|
||||
|
||||
<div class="tools ">
|
||||
<ul><h3>项目交流</h3>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%></li>
|
||||
<% if @project.enabled_modules.where("name = 'files'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
|
||||
<% end %>
|
||||
<% if @project.enabled_modules.where("name = 'wiki'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
|
||||
<% end %>
|
||||
<% if @project.enabled_modules.where("name = 'code_review'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_code_review), {controller: 'code_review', action: 'index', id: @project.id} %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul><h3>进度跟踪</h3>
|
||||
<% if @project.enabled_modules.where("name = 'calendar'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
|
||||
<% end %>
|
||||
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %></li>
|
||||
<% if @project.enabled_modules.where("name = 'gantt'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
<ul><h3>其他工具</h3>
|
||||
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
|
||||
<% end %>
|
||||
<% if @project.enabled_modules.where(" name = 'documents'").count > 0 %>
|
||||
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
||||
<% end %>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">用户反馈</h2>
|
||||
</div>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
<div class="member_header">
|
||||
<p>
|
||||
<%= @subPage_title %>
|
||||
</p>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= @subPage_title %></h2>
|
||||
</div>
|
||||
<div class="member_content">
|
||||
<%= error_messages_for 'member' %>
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
@nav_dispaly_forum_label = 1 %>
|
||||
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<h3><%=l(:label_project_new)%></h3>
|
||||
<div class="project_new"><%=l(:label_project_new)%><span class="description"> <%=raw l(:label_project_new_description)%></span>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)"> <%=raw l(:label_project_new_description)%> </p>
|
||||
<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"%>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<h3><%=l(:label_settings)%></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%=l(:label_settings)%></h2>
|
||||
</div>
|
||||
<% if @project.project_type == 1 %>
|
||||
<%= render_tabs course_settings_tabs %>
|
||||
<% else %>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<!-- <h3>测试结果</h3> -->
|
||||
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">DTS测试</h2>
|
||||
</div>
|
||||
<p id="stcloud" style="padding-bottom: 5px">
|
||||
<a href="http://www.trustie.net/webdts/" style="float:right" target="_blank"><strong>进入测试平台</strong></a>
|
||||
</p>
|
||||
|
|
|
@ -1,121 +1,177 @@
|
|||
<% if @events_by_day.size >0 %>
|
||||
<div class="content-title-top-avtive">
|
||||
<p class="subtitle">
|
||||
<!-- # 暂时隐藏时间的显示% -->
|
||||
<%#= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
||||
</p>
|
||||
|
||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong>
|
||||
<%= h(e.project) if @project.nil? || @project.id != e.project.id %>
|
||||
</strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
|
||||
<% else %>
|
||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||
<% end %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable e,:event_description %>
|
||||
<%#= h(truncate(strip_tags(e.event_description).gsub(/ /, ' '), length: 30, omission: '...')) %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
:
|
||||
<%= format_activity_day(day) %>
|
||||
<%= format_time(e.event_datetime, false) %>
|
||||
</span>
|
||||
<% if e.event_type == "issue" %>
|
||||
<div class="" style="display:inline-block;position:absolute; right:2%;">
|
||||
<span>
|
||||
<%= link_to l(:label_find_all_comments), issue_path(e) %>
|
||||
</span>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_comments_count, :count => e.journals.count) %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end -%>
|
||||
<% if (@events_pages.page == @events_pages.last_page) %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
(<%= link_to_user(@user, @canShowRealName) %>)
|
||||
<% else %>
|
||||
<%= link_to_user(@user) %>
|
||||
<% end %>
|
||||
<%#= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= l(:label_user_create_project) %>
|
||||
<%= link_to @project.name %>
|
||||
<strong> !</strong>
|
||||
<div class="activity_description info-break" style="font-size: 13px;">
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter">
|
||||
<%= l :label_activity_time %>:
|
||||
<%= format_time(@project.created_on) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(@user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<span class="activity-title font_lighter">
|
||||
<% if @canShowRealName %>
|
||||
(<%= link_to_user(@user, @canShowRealName) %>)
|
||||
<% else %>
|
||||
<%= link_to_user(@user) %>
|
||||
<% end %>
|
||||
<%#= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= @user.to_s %>
|
||||
<%= l(:label_user_create_project) %>
|
||||
<%= link_to @project.name %>
|
||||
<strong> !</strong>
|
||||
<div class="activity_description info-break" style="font-size: 13px;">
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter">
|
||||
<%= l :label_activity_time %>:
|
||||
<%= format_time(@project.created_on) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= pagination_links_full @events_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
<% html_title(l(:label_overview)) -%>
|
||||
|
||||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||
<script>
|
||||
/* $(document).ready(function (){ //别忘了加这句,除非你没学Jquery
|
||||
$("#container").infinitescroll({
|
||||
navSelector: "#paginator", //页面分页元素--成功后自动隐藏
|
||||
nextSelector: "#paginator a[rel='next']", //下一页的按钮,但是貌似这个选不中
|
||||
itemSelector: ".scroll " ,
|
||||
path: function(current){ var page = parseInt(current)+1;
|
||||
var project_id = <%= @project.id %>;
|
||||
return "/projects/"+project_id+"?page="+page
|
||||
}, //下一页的路径
|
||||
animate: true,
|
||||
maxPage: 500
|
||||
});
|
||||
});*/
|
||||
</script>
|
||||
<div id="container">
|
||||
<div class="scroll">
|
||||
<% unless @events_pages.empty? %>
|
||||
<% @events_pages.each do |e| -%>
|
||||
<% act = e.forge_act %>
|
||||
<% if e.forge_act_type == "Issue" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(act.author), :class => "avatar") %>
|
||||
</div>
|
||||
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to_user(act.author) %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from}##{act.project_issues_index} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
||||
{:controller => 'issues',
|
||||
:action => 'show',
|
||||
:id => act.id} %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:description %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
<div class="" style="display:inline-block;position:absolute; right:2%;">
|
||||
<span> <%= link_to l(:label_find_all_comments), issue_path(act.id) %> </span><span class="font_lighter"><%= l(:label_comments_count, :count => act.journals.count) %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif e.forge_act_type == "Journal" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</div>
|
||||
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.id)) %>
|
||||
<%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"),
|
||||
{:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:notes %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif e.forge_act_type == "Message" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
<%= 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}"}) %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:content %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif e.forge_act_type == "News" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:description %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
<div class="" style="display:inline-block;position:absolute; right:2%;">
|
||||
<span>
|
||||
<%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
</span>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_comments_count, :count => act.comments_count) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif e.forge_act_type == "Document" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{l(:label_document)}: #{act.title}"), {:controller => 'documents', :action => 'show', :id => act.id} %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:description %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif e.forge_act_type == "Attachment" %>
|
||||
<div class="activity-item underline-evreycontent" style="font-size: 14px;line-height:1.5em;width: 100%;word-wrap: break-word;word-break: break-all;">
|
||||
<div class="activity-avatar" style="float: left; margin:3px; height: 100%;">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</div>
|
||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project_id %></strong>
|
||||
<span class="activity-title font_lighter">
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{l(:label_attachment)}: #{act.filename}"), {:controller => 'attachments', :action => 'show', :id => act.id} %>
|
||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable act,:description %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
<span class="font_lighter"> <%= l :label_activity_time %>
|
||||
: <%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= paginate @events_pages %>
|
|
@ -0,0 +1 @@
|
|||
$('#content').html('<%= escape_javascript(render :partial => 'projects/newproject_show') %>');
|
|
@ -1,5 +1,7 @@
|
|||
<!--add by huang-->
|
||||
<h3><%= l(:label_user_watcher)%></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
|
||||
</div>
|
||||
<div class="inf_user_image">
|
||||
<% for user in @project.watcher_users %> <!-- @project.watcher_users.count -->
|
||||
<ul class="list_watch">
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<h3><%= l(:label_repository_new) %></h3>
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_repository_new_repos) %></h2>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//var re=new RegExp(strRegex);
|
||||
function createVersion(){
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2">版本库</h2>
|
||||
</div>
|
||||
<div class="contextual" style="padding-right: 10px;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
<!-- 上左下右 -->
|
||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
||||
<% unless project.is_public %>
|
||||
<span class="private_project"> <%= l(:label_private) %> </span>
|
||||
<span class="private_project">
|
||||
<%= l(:label_private) %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to l(:label_project_member_amount, :count=>projectCount(project)), project_member_path(project) ,:course =>'0' %>)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<%= image_tag '/images/transparent.png', width:@first_page.image_width,height: @first_page.image_height %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@enterprise_page), width:@first_page.image_width,height: @first_page.image_height) %>
|
||||
<%= image_tag(url_to_avatar(@organization), width:@first_page.image_width,height: @first_page.image_height) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="welcome_left" id="welcome_left">
|
||||
|
@ -47,9 +47,9 @@
|
|||
<%= @first_page.description.html_safe %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span class="font_welcome_school" style="color: #E8770D">
|
||||
<%= @organization %>
|
||||
</span>
|
||||
<span class="font_welcome_school" style="color: #E8770D">
|
||||
<%= @organization.name %>
|
||||
</span>
|
||||
<br/>
|
||||
<span class="font_welcome_trustie">
|
||||
<%= @enterprise_page.title %>
|
||||
|
@ -86,24 +86,25 @@
|
|||
<% end; reset_cycle %>
|
||||
<!-- 企业版项目 -->
|
||||
<% else %>
|
||||
<% if @e_count == 0 %>
|
||||
<div id="flash_notice" class="flash notice"><%= l(:label_enterprise_tips) %></div>
|
||||
<% @projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% elsif @e_count < 10 %>
|
||||
<% @organization_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<div id="flash_notice" class="flash notice"><%= l(:label_part_enterprise_tips) %></div>
|
||||
<% @part_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @part_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @part_projects.empty? %>
|
||||
<% @projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @organization_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<li>
|
||||
<h1></h1>
|
||||
<div id="errorExplanation">
|
||||
<%= l(:label_part_enterprise_tips) %>
|
||||
</div>
|
||||
<h1></h1>
|
||||
</li>
|
||||
<% @part_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -117,10 +118,8 @@
|
|||
</strong>
|
||||
</h3>
|
||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||
<% cache("activities") do %>
|
||||
<%activities = find_all_activities%>
|
||||
<% activities.each do |event| %>
|
||||
<% cache event do %>
|
||||
<li style="display: block;height:60px; padding-bottom: 4px;">
|
||||
<div class="inner-right" style="float: left; height: 100%; ">
|
||||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
||||
|
@ -145,25 +144,20 @@
|
|||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="right" style="float: right; width: 48%; ">
|
||||
<ul class="welcome-message-list">
|
||||
<!--<%# cache 'forum_links' do %> -->
|
||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </strong> <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||
<%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> </h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
|
||||
</div>
|
||||
<div class="welcome-box-list-new memo_activity">
|
||||
<% cache("forums") do %>
|
||||
<% topics = find_new_forum_topics(6) %>
|
||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||
<% cache topic do %>
|
||||
<li class="message-brief-intro" style="line-height:1.4em;">
|
||||
<div class='memo_title text_nowrap'>
|
||||
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
|
||||
|
@ -192,9 +186,6 @@
|
|||
</div>
|
||||
</li>
|
||||
<%end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,39 +1,42 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2">Wiki</h2>
|
||||
</div>
|
||||
<div class="contextual">
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= watcher_link(@page, User.current) %>
|
||||
<%#= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= watcher_link(@page, User.current) %>
|
||||
<%#= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
</div>
|
||||
<%= wiki_page_breadcrumb(@page) %>
|
||||
<% unless @content.current_version? %>
|
||||
<p>
|
||||
<%= link_to(("\xc2\xab " + l(:label_previous)),
|
||||
:action => 'show', :id => @page.title, :project_id => @page.project,
|
||||
:version => @content.previous.version) + " - " if @content.previous %>
|
||||
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
||||
<%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.version) + ')'.html_safe if @content.previous %> -
|
||||
<%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.next.version) + " - " if @content.next %>
|
||||
<%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
|
||||
<br />
|
||||
<em>
|
||||
<%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)%>,
|
||||
<%= format_time(@content.updated_on) %>
|
||||
</em>
|
||||
<br />
|
||||
<%=h @content.comments %>
|
||||
<%= link_to(("\xc2\xab " + l(:label_previous)),
|
||||
:action => 'show', :id => @page.title, :project_id => @page.project,
|
||||
:version => @content.previous.version) + " - " if @content.previous %>
|
||||
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
|
||||
<%= '('.html_safe + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.version) + ')'.html_safe if @content.previous %> -
|
||||
<%= link_to((l(:label_next) + " \xc2\xbb"), :action => 'show',
|
||||
:id => @page.title, :project_id => @page.project,
|
||||
:version => @content.next.version) + " - " if @content.next %>
|
||||
<%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => nil) %>
|
||||
<br />
|
||||
<em>
|
||||
<%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous)%>,
|
||||
<%= format_time(@content.updated_on) %>
|
||||
</em>
|
||||
<br />
|
||||
<%=h @content.comments %>
|
||||
</p>
|
||||
<hr />
|
||||
<% end %>
|
||||
|
@ -41,31 +44,31 @@
|
|||
<%= link_to_attachments @page %>
|
||||
<% if @editable && authorize_for('wiki', 'add_attachment') %>
|
||||
<div id="wiki_add_attachment">
|
||||
<p>
|
||||
<%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
||||
:id => 'attach_files_link' %></p>
|
||||
<p>
|
||||
<%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
||||
:id => 'attach_files_link' %></p>
|
||||
<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
|
||||
:project_id => @project, :id => @page.title},
|
||||
:multipart => true, :id => "add_attachment_form",
|
||||
:style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
||||
:project_id => @project, :id => @page.title},
|
||||
:multipart => true, :id => "add_attachment_form",
|
||||
:style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
||||
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<%= render :partial => 'sidebar' %>
|
||||
<% end %>
|
||||
<% html_title @page.pretty_title %>
|
||||
|
||||
|
|
|
@ -47,11 +47,12 @@
|
|||
</div>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<% if @user.safe_attribute? 'user_message' %>
|
||||
<%= f.text_area 'user_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_leave_a_message)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline',:maxlength => 250%>
|
||||
|
||||
:class => 'noline'%>
|
||||
<% end %>
|
||||
<%= f.text_field :reference_user_id, :style=>"display:none"%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% else %>
|
||||
|
|
|
@ -247,7 +247,7 @@ zh:
|
|||
label_course_closed_tips: "确定要%{desc}课程?"
|
||||
# end
|
||||
field_name: 名称
|
||||
field_enterprise_name: 组织名称
|
||||
field_enterprise_name: 组织
|
||||
|
||||
label_week_mail: 一周动态
|
||||
label_day_mail: 一日动态
|
||||
|
@ -522,6 +522,7 @@ zh:
|
|||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
project_module_files: 作品下载
|
||||
project_module_attachments: 资源
|
||||
project_module_wiki: Wiki
|
||||
project_module_repository: 版本库
|
||||
project_module_boards: 讨论区
|
||||
|
@ -538,6 +539,12 @@ zh:
|
|||
label_project: 项目
|
||||
label_activity_project: '项目: ' #added by bai
|
||||
|
||||
label_organization: 组织
|
||||
label_organization_choose: --请选择组织--
|
||||
label_organization_name: 组织名称
|
||||
label_organization_list: 组织列表
|
||||
label_organization_new: 新建组织
|
||||
label_organization_edit: 修改组织
|
||||
label_project_plural: 项目列表
|
||||
label_first_page_made: 首页定制
|
||||
label_project_first_page: 项目托管平台首页
|
||||
|
@ -2352,7 +2359,7 @@ zh:
|
|||
|
||||
|
||||
# 项目托管平台 >新建项目
|
||||
label_project_new_description: '项目可以是软件开发项目,也可以是协作研究项目。'
|
||||
label_project_new_description: '(项目为您和您的团队提供一个面向分布式协作的专有空间,可以设置为公开或私有。)'
|
||||
field_name: 名称
|
||||
field_description: 描述
|
||||
field_identifier: 标识
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
# Example: :via => :get ====> :via => :get
|
||||
|
||||
RedmineApp::Application.routes.draw do
|
||||
get "organizations/index"
|
||||
|
||||
#match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => 'index'
|
||||
|
||||
mount Mobile::API => '/api'
|
||||
|
||||
|
@ -39,6 +36,10 @@ RedmineApp::Application.routes.draw do
|
|||
resources :apply_project_masters
|
||||
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
|
||||
|
||||
resources :organization, :except => [:show] do
|
||||
|
||||
end
|
||||
|
||||
resources :homework_attach do
|
||||
collection do
|
||||
get 'get_homework_member_list'
|
||||
|
@ -390,7 +391,6 @@ RedmineApp::Application.routes.draw do
|
|||
match '/statistics', :to => 'projects#statistics', :as => 'statistics', :via => :get
|
||||
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
|
||||
match '/homework', :to => 'projects#homework', :as => 'homework', :via => :get
|
||||
match 'organizations', :to => 'organizations#index', :as => 'index', :via => :get
|
||||
|
||||
# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get
|
||||
# match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
|
||||
|
@ -647,6 +647,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'admin/info', :via => :get
|
||||
match 'admin/test_email', :via => :get
|
||||
match 'admin/default_configuration', :via => :post
|
||||
get 'admin/organization'
|
||||
|
||||
resources :auth_sources do
|
||||
member do
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
class CreateForgeActivities < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :forge_activities do |t|
|
||||
t.integer :user_id
|
||||
t.integer :project_id
|
||||
t.references :forge_act, polymorphic: true, index: true
|
||||
t.integer :org_id
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :forge_activities ,:forge_act_id
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
# Time 2015-02-37 15:03:42
|
||||
# Author lizanle
|
||||
# Description 将Issue中的数据导入forge_activities表
|
||||
class ImportIssueDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
issue_arr = select_all("SELECT\n" +
|
||||
" `issues`.`id` AS id,\n" +
|
||||
" `issues`.`project_id` AS project_id,\n" +
|
||||
" `issues`.`author_id` AS author_id,\n" +
|
||||
" `issues`.`created_on` AS created_on,\n" +
|
||||
" `issues`.`updated_on` AS updated_on\n" +
|
||||
"FROM\n" +
|
||||
" `issues`\n" +
|
||||
"LEFT OUTER JOIN `projects` ON `projects`.`id` = `issues`.`project_id`\n" +
|
||||
"LEFT OUTER JOIN `users` ON `users`.`id` = `issues`.`author_id`\n" +
|
||||
"AND `users`.`type` IN ('User', 'AnonymousUser')\n" +
|
||||
"LEFT OUTER JOIN `trackers` ON `trackers`.`id` = `issues`.`tracker_id`\n" +
|
||||
"WHERE\n" +
|
||||
" (\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'issue_tracking'\n" +
|
||||
" )\n" +
|
||||
" )");
|
||||
issue_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{Issue.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["updated_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_ISSUE_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,51 @@
|
|||
class AddJournalDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
journal_arr = select_all("SELECT\n" +
|
||||
" `journals`.`id` AS id,\n" +
|
||||
" `journals`.`created_on` AS created_on,\n" +
|
||||
" `projects`.`id` AS project_id,\n" +
|
||||
" `issues`.`updated_on` AS updated_on,\n" +
|
||||
" `users`.`id` AS author_id\n" +
|
||||
"FROM\n" +
|
||||
" `journals`\n" +
|
||||
"LEFT OUTER JOIN `issues` ON `issues`.`id` = `journals`.`journalized_id`\n" +
|
||||
"LEFT OUTER JOIN `projects` ON `projects`.`id` = `issues`.`project_id`\n" +
|
||||
"LEFT OUTER JOIN `journal_details` ON `journal_details`.`journal_id` = `journals`.`id`\n" +
|
||||
"LEFT OUTER JOIN `users` ON `users`.`id` = `journals`.`user_id`\n" +
|
||||
"AND `users`.`type` IN ('User', 'AnonymousUser')\n" +
|
||||
"WHERE\n" +
|
||||
" (\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'issue_tracking'\n" +
|
||||
" )\n" +
|
||||
" )\n" +
|
||||
" AND (\n" +
|
||||
" journals.journalized_type = 'Issue'\n" +
|
||||
" AND (\n" +
|
||||
" journal_details.prop_key = 'status_id'\n" +
|
||||
" OR journals.notes <> ''\n" +
|
||||
" )\n" +
|
||||
" )");
|
||||
journal_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{Journal.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["updated_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_JOURNAL_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
class ImportMessageDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
issue_arr = select_all("SELECT\n" +
|
||||
" `messages`.`id` AS id,\n" +
|
||||
" `messages`.`author_id` AS author_id,\n" +
|
||||
" `projects`.`id` AS project_id,\n" +
|
||||
" `messages`.`created_on` AS created_on,\n" +
|
||||
" `messages`.`updated_on` AS updated_on\n" +
|
||||
"FROM\n" +
|
||||
" `messages`\n" +
|
||||
"LEFT OUTER JOIN `boards` ON `boards`.`id` = `messages`.`board_id`\n" +
|
||||
"LEFT OUTER JOIN `projects` ON `projects`.`id` = `boards`.`project_id`\n" +
|
||||
"LEFT OUTER JOIN `users` ON `users`.`id` = `messages`.`author_id`\n" +
|
||||
"AND `users`.`type` IN ('User', 'AnonymousUser')\n" +
|
||||
"WHERE\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'boards'\n" +
|
||||
")");
|
||||
issue_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{Message.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["updated_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_MESSAGE_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
class ImportNewsDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
issue_arr = select_all("SELECT\n" +
|
||||
" `messages`.`id` AS id,\n" +
|
||||
" `messages`.`author_id` AS author_id,\n" +
|
||||
" `projects`.`id` AS project_id,\n" +
|
||||
" `messages`.`created_on` AS created_on,\n" +
|
||||
" `messages`.`updated_on` AS updated_on\n" +
|
||||
"FROM\n" +
|
||||
" `messages`\n" +
|
||||
"LEFT OUTER JOIN `boards` ON `boards`.`id` = `messages`.`board_id`\n" +
|
||||
"LEFT OUTER JOIN `projects` ON `projects`.`id` = `boards`.`project_id`\n" +
|
||||
"LEFT OUTER JOIN `users` ON `users`.`id` = `messages`.`author_id`\n" +
|
||||
"AND `users`.`type` IN ('User', 'AnonymousUser')\n" +
|
||||
"WHERE\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'boards'\n" +
|
||||
")");
|
||||
issue_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{News.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_NEWS_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
class AddColumnProjectIssueIndexToIssues < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :issues, :project_issues_index, :integer
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
class AddDataToProjectIssuesIndexsInIssue < ActiveRecord::Migration
|
||||
def change
|
||||
for i in 1 ... 1000 do i
|
||||
Issue.page(i).per(10).each do |e|
|
||||
index = e.project.issues.index(e).to_i + 1
|
||||
execute("update issues set project_issues_index = #{index} where id = #{e.id}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,37 @@
|
|||
class ImportDocumentDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
doc_arr = select_all("SELECT\n" +
|
||||
" `documents`.`id` AS id,\n" +
|
||||
" `documents`.`project_id` AS project_id,\n" +
|
||||
" `documents`.`created_on` AS created_on,\n" +
|
||||
" `documents`.`user_id` AS author_id\n" +
|
||||
"FROM\n" +
|
||||
" `documents`\n" +
|
||||
"LEFT OUTER JOIN `projects` ON `projects`.`id` = `documents`.`project_id`\n" +
|
||||
"WHERE\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'documents'\n" +
|
||||
")");
|
||||
doc_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{Document.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_DOCUMENT_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
class ImportAttachmentsDataToForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
attach_arr = select_all("SELECT\n" +
|
||||
" attachments.author_id as author_id,\n" +
|
||||
" attachments.created_on as created_on,\n" +
|
||||
" attachments.id as id,\n" +
|
||||
" projects.id as project_id\n" +
|
||||
"FROM\n" +
|
||||
" `attachments`\n" +
|
||||
"LEFT JOIN versions ON attachments.container_type = 'Version'\n" +
|
||||
"AND versions.id = attachments.container_id\n" +
|
||||
"LEFT JOIN projects ON versions.project_id = projects.id\n" +
|
||||
"OR (\n" +
|
||||
" attachments.container_type = 'Project'\n" +
|
||||
" AND attachments.container_id = projects.id\n" +
|
||||
")\n" +
|
||||
"WHERE\n" +
|
||||
" projects. STATUS <> 9\n" +
|
||||
" AND projects.id IN (\n" +
|
||||
" SELECT\n" +
|
||||
" em.project_id\n" +
|
||||
" FROM\n" +
|
||||
" enabled_modules em\n" +
|
||||
" WHERE\n" +
|
||||
" em. NAME = 'files'\n" +
|
||||
" )");
|
||||
attach_arr.each do |e|
|
||||
ForgeActivity.connection.execute("insert into forge_activities(forge_act_id,
|
||||
forge_act_type,
|
||||
project_id,
|
||||
user_id,
|
||||
created_at,
|
||||
updated_at)
|
||||
values(#{e["id"]},'#{Attachment.to_s}',#{e["project_id"]},#{e["author_id"]},
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}',
|
||||
'#{e["created_on"].to_s.gsub("+0800","").to_datetime.strftime("%Y-%m-%d %H:%M:%S")}')")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
ForgeActivity.delete_all([" forge_act_type = ?",ForgeActivity::TYPE_OF_ATTACHMENT_ACT])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
class CreateOrganizations < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :organizations do |t|
|
||||
t.string :name
|
||||
t.string :logo_link
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class AddOrganizationToProject < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :projects, :organization_id, :integer
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :projects, :organization_id
|
||||
end
|
||||
end
|
44
db/schema.rb
44
db/schema.rb
|
@ -11,7 +11,11 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
<<<<<<< HEAD
|
||||
ActiveRecord::Schema.define(:version => 20150305081132) do
|
||||
=======
|
||||
ActiveRecord::Schema.define(:version => 20150305011359) do
|
||||
>>>>>>> 001b8bb1120fadea713d280e7d5bbabf7f5e57b8
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -472,6 +476,18 @@ ActiveRecord::Schema.define(:version => 20150305081132) do
|
|||
t.integer "show_contest", :default => 1
|
||||
end
|
||||
|
||||
create_table "forge_activities", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "project_id"
|
||||
t.integer "forge_act_id"
|
||||
t.string "forge_act_type"
|
||||
t.integer "org_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id"
|
||||
|
||||
create_table "forums", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
t.text "description"
|
||||
|
@ -558,29 +574,30 @@ ActiveRecord::Schema.define(:version => 20150305081132) do
|
|||
add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position"
|
||||
|
||||
create_table "issues", :force => true do |t|
|
||||
t.integer "tracker_id", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.string "subject", :default => "", :null => false
|
||||
t.integer "tracker_id", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.string "subject", :default => "", :null => false
|
||||
t.text "description"
|
||||
t.date "due_date"
|
||||
t.integer "category_id"
|
||||
t.integer "status_id", :null => false
|
||||
t.integer "status_id", :null => false
|
||||
t.integer "assigned_to_id"
|
||||
t.integer "priority_id", :null => false
|
||||
t.integer "priority_id", :null => false
|
||||
t.integer "fixed_version_id"
|
||||
t.integer "author_id", :null => false
|
||||
t.integer "lock_version", :default => 0, :null => false
|
||||
t.integer "author_id", :null => false
|
||||
t.integer "lock_version", :default => 0, :null => false
|
||||
t.datetime "created_on"
|
||||
t.datetime "updated_on"
|
||||
t.date "start_date"
|
||||
t.integer "done_ratio", :default => 0, :null => false
|
||||
t.integer "done_ratio", :default => 0, :null => false
|
||||
t.float "estimated_hours"
|
||||
t.integer "parent_id"
|
||||
t.integer "root_id"
|
||||
t.integer "lft"
|
||||
t.integer "rgt"
|
||||
t.boolean "is_private", :default => false, :null => false
|
||||
t.boolean "is_private", :default => false, :null => false
|
||||
t.datetime "closed_on"
|
||||
t.integer "project_issues_index"
|
||||
end
|
||||
|
||||
add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id"
|
||||
|
@ -802,11 +819,19 @@ ActiveRecord::Schema.define(:version => 20150305081132) do
|
|||
t.integer "project_id"
|
||||
end
|
||||
|
||||
<<<<<<< HEAD
|
||||
create_table "phone_app_versions", :force => true do |t|
|
||||
t.string "version"
|
||||
t.text "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
=======
|
||||
create_table "organizations", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "logo_link"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
>>>>>>> 001b8bb1120fadea713d280e7d5bbabf7f5e57b8
|
||||
end
|
||||
|
||||
create_table "poll_answers", :force => true do |t|
|
||||
|
@ -933,6 +958,7 @@ ActiveRecord::Schema.define(:version => 20150305081132) do
|
|||
t.integer "user_id"
|
||||
t.integer "dts_test", :default => 0
|
||||
t.string "enterprise_name"
|
||||
t.integer "organization_id"
|
||||
end
|
||||
|
||||
add_index "projects", ["lft"], :name => "index_projects_on_lft"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
lib/dalli.rb b1fd9d39df06608fcae5bcf46e9940f95b186d22
|
||||
lib/dalli/ring.rb e2cd42d8b963e669e2c8a83791fa56ec94f9ec55
|
||||
lib/dalli/server.rb a42d734f9b3d654886c86f04fb4f0352e7147b1e
|
||||
lib/dalli/client.rb 11afa0d702c68a151c87ea6e7ccdc863cf03884f
|
||||
lib/dalli/socket.rb 18b7243332ec2dafa9a17c195944e321b684e67e
|
||||
lib/dalli/options.rb d7ecb4c52b4ae2b222f319813234297e0951f82a
|
||||
lib/dalli/version.rb fff3231b7f52d7fa1dabb78bf1f67dcef95c5378
|
||||
lib/dalli/railtie.rb 63dc0fe85790a10225e867774f2c611d1c1ac46c
|
||||
lib/dalli/compressor.rb 13b0cf3f607bd8bc9f969679b0b6e9dcb0a059d7
|
||||
lib/dalli/cas/client.rb 983ded7ec738ed4502658150123e9c5ad7e3faa1
|
||||
lib/rack/session/dalli.rb 2696ad72e8f9d7f5ceb232db0c8d9a8916192edb
|
||||
lib/active_support/cache/dalli_store.rb 010d880e0f297d92b26c8f44e446add9d4fedfa2
|
||||
lib/action_dispatch/middleware/session/dalli_store.rb 62236273ea28a91502871f31aa600e038358931a
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue