Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
df1c578ff3
|
@ -99,8 +99,8 @@ class AccountController < ApplicationController
|
|||
|
||||
# User self-registration
|
||||
def register
|
||||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
|
||||
# @root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
#
|
||||
(redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
|
||||
if request.get?
|
||||
session[:auth_source_registration] = nil
|
||||
|
@ -125,16 +125,16 @@ class AccountController < ApplicationController
|
|||
@user.login = params[:user][:login]
|
||||
unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank?
|
||||
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
|
||||
system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password]
|
||||
system "echo -e '\n"+params[:user][:login]+"-write:"+
|
||||
" "+params[:user][:login]+"' >> "+@root_path+"group.passwd"
|
||||
system "mkdir "+@root_path+"htdocs/"+params[:user][:login]
|
||||
|
||||
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||
"Require group "+params[:user][:login]+"-write \n "+
|
||||
"</Limit> \n ' >>"+
|
||||
@root_path+"htdocs/"+params[:user][:login]+"/.htaccess"
|
||||
# system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password]
|
||||
# system "echo -e '\n"+params[:user][:login]+"-write:"+
|
||||
# " "+params[:user][:login]+"' >> "+@root_path+"group.passwd"
|
||||
# system "mkdir "+@root_path+"htdocs/"+params[:user][:login]
|
||||
#
|
||||
# system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||
# "<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||
# "Require group "+params[:user][:login]+"-write \n "+
|
||||
# "</Limit> \n ' >>"+
|
||||
# @root_path+"htdocs/"+params[:user][:login]+"/.htaccess"
|
||||
end
|
||||
|
||||
case Setting.self_registration
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#added by baiyu
|
||||
class GitUsageController < ApplicationController
|
||||
def ch_usage
|
||||
|
||||
end
|
||||
|
||||
def en_usage
|
||||
|
||||
end
|
||||
end
|
||||
#end
|
|
@ -87,9 +87,7 @@ class MyController < ApplicationController
|
|||
|
||||
# Manage user's password
|
||||
def password
|
||||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
@user = User.current
|
||||
@middle = "^"+@user.login.to_s+":"
|
||||
unless @user.change_password_allowed?
|
||||
flash[:error] = l(:notice_can_t_change_password)
|
||||
redirect_to my_account_path
|
||||
|
@ -98,17 +96,7 @@ class MyController < ApplicationController
|
|||
if request.post?
|
||||
if @user.check_password?(params[:password])
|
||||
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
||||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
system "sed -i /"+@middle+"/{d} "+@root_path+"user.passwd"
|
||||
system "htpasswd -mb "+@root_path+"user.passwd "+@user.login.to_s+" "+params[:new_password]
|
||||
system "echo -e '\n"+@user.login.to_s+"-write:"+
|
||||
" "+@user.login.to_s+"' >> "+@root_path+"group.passwd"
|
||||
system "mkdir "+@root_path+"htdocs/"+@user.login.to_s
|
||||
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||
"Require group "+@user.login.to_s+"-write \n "+
|
||||
"</Limit> \n ' >>"+
|
||||
@root_path+"htdocs/"+@user.login.to_s+"/.htaccess"
|
||||
|
||||
if @user.save
|
||||
flash[:notice] = l(:notice_account_password_updated)
|
||||
redirect_to my_account_path
|
||||
|
|
|
@ -22,7 +22,7 @@ class ProjectsController < ApplicationController
|
|||
# menu_item :settings, :only => :settings
|
||||
|
||||
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
|
||||
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics]
|
||||
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback]
|
||||
before_filter :authorize_global, :only => [:new, :create]
|
||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
|
||||
#by young
|
||||
|
@ -122,6 +122,16 @@ class ProjectsController < ApplicationController
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
def feedback
|
||||
@jours = @project.journals_for_messages.reverse
|
||||
@limit = 10
|
||||
@feedback_count = @jours.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@offset ||= @feedback_pages.offset
|
||||
@jour = @jours[@offset, @limit]
|
||||
@state = false
|
||||
end
|
||||
|
||||
def new
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
|
@ -355,7 +365,10 @@ class ProjectsController < ApplicationController
|
|||
format.html { redirect_to admin_projects_path }
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
else
|
||||
render :layout => "base"
|
||||
end
|
||||
|
||||
# hide project in layout
|
||||
@project = nil
|
||||
end
|
||||
|
|
|
@ -75,16 +75,10 @@ class RepositoriesController < ApplicationController
|
|||
@root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
|
||||
@project_path=@root_path+"htdocs/"+@repository_name
|
||||
@repository_tag=params[:repository][:url]
|
||||
@repository_tag=params[:repository][:upassword]
|
||||
attrs = pickup_extra_info
|
||||
if(!@repository_tag)
|
||||
# params[:repository][:password]=params[:repository][:upassword]
|
||||
if(params[:repository_scm]=="Git")
|
||||
params[:repository][:url]=@project_path
|
||||
end
|
||||
# else
|
||||
# render_error l(:error_scm_password_not_set); return
|
||||
# render :action => 'newrepo'
|
||||
if((@repository_tag!="")&¶ms[:repository_scm]=="Git")
|
||||
params[:repository][:url]=@project_path
|
||||
end
|
||||
###xianbo
|
||||
@repository = Repository.factory(params[:repository_scm])
|
||||
|
@ -97,10 +91,19 @@ class RepositoriesController < ApplicationController
|
|||
@repository.project = @project
|
||||
if request.post? && @repository.save
|
||||
if(params[:repository_scm]=="Git")
|
||||
system "git init --bare "+@project_path
|
||||
system "mv "+@project_path+"/hooks/post-update{.sample,}"
|
||||
system "chmod a+x "+@project_path+"/hooks/post-update"
|
||||
|
||||
system "htpasswd -mb "+@root_path+"user.passwd "+User.current.login.to_s+" "+@repository_tag
|
||||
system "echo -e '\n"+User.current.login.to_s+"-"+params[:repository][:identifier]+"-write:"+
|
||||
" "+User.current.login.to_s+"' >> "+@root_path+"group.passwd"
|
||||
system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s
|
||||
system "git init --bare "+@project_path
|
||||
system "mv "+@project_path+"/hooks/post-update{.sample,}"
|
||||
system "chmod a+x "+@project_path+"/hooks/post-update"
|
||||
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||
"Require group "+User.current.login.to_s+"-"+params[:repository][:identifier]+"-write \n "+
|
||||
"</Limit> \n ' >> "+
|
||||
@root_path+"htdocs/"+ @repository_name+"/.htaccess"
|
||||
|
||||
puts "before ======================================================================"
|
||||
puts system "cd "+@project_path+" ;git update-server-info"
|
||||
flag = system "cd "+@project_path+" ;git update-server-info"
|
||||
|
@ -108,7 +111,7 @@ class RepositoriesController < ApplicationController
|
|||
@repository.update_attributes(:login => User.current.login.to_s)
|
||||
end
|
||||
redirect_to settings_project_path(@project, :tab => 'repositories')
|
||||
else if(!@repository_tag)
|
||||
else if(@repository_tag)
|
||||
render :action => 'newrepo', :layout =>'base_projects'
|
||||
else
|
||||
render :action => 'new', :layout =>'base_projects'
|
||||
|
|
|
@ -185,7 +185,7 @@ class VersionsController < ApplicationController
|
|||
if ids = params[:tracker_ids]
|
||||
@selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s }
|
||||
else
|
||||
@selected_tracker_ids = (default_trackers || selectable_trackers).collect {|t| t.id.to_s }
|
||||
@selected_tracker_ids = (selectable_trackers).collect {|t| t.id.to_s }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -107,6 +107,15 @@ class WordsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def add_project_respond
|
||||
user = User.current
|
||||
message = params[:new_form][:project_message]
|
||||
Project.add_jour(user, message)
|
||||
|
||||
redirect_to project_feedback_path('trustie')
|
||||
# redirect_to signin_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_user
|
||||
|
|
|
@ -51,6 +51,9 @@ class Project < ActiveRecord::Base
|
|||
has_one :repository, :conditions => ["is_default = ?", true]
|
||||
has_many :repositories, :dependent => :destroy
|
||||
has_many :changesets, :through => :repository
|
||||
# added by fq
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
# end
|
||||
#ADDED BY NIE
|
||||
has_many :project_infos, :dependent => :destroy
|
||||
#end
|
||||
|
@ -127,6 +130,14 @@ class Project < ActiveRecord::Base
|
|||
where("LOWER(identifier) LIKE :p OR LOWER(name) LIKE :p", :p => pattern)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
# 项目留言 added by fq
|
||||
def self.add_jour(user, notes)
|
||||
project = Project.find('trustie')
|
||||
project.journals_for_messages << JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => 0)
|
||||
end
|
||||
# end
|
||||
|
||||
def initialize(attributes=nil, *args)
|
||||
super
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
<!-- added by baiyu -->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>无标题文档</title>
|
||||
|
||||
<style type="text/css">
|
||||
body table tr th {
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
}
|
||||
body table tr td {
|
||||
color: #333;
|
||||
}
|
||||
body table tr td {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
font-family: "Comic Sans MS", cursive;
|
||||
}
|
||||
body table tr td span {
|
||||
color: #039;
|
||||
}
|
||||
body p {
|
||||
font-size: 18px;
|
||||
color: #009;
|
||||
}
|
||||
body table tr td p {
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body><table width="896" border="0">
|
||||
<tr>
|
||||
<th width="890" align="center" valign="middle"> Git使用说明</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="892" border="0">
|
||||
<tr>
|
||||
<td width="886">我们将使用 <span>git</span> 这个分布式版本控制系统来提交代码,下面就来介绍一下代码的提交方法。</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="200" border="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="456" border="0">
|
||||
<tr>
|
||||
<td width="450"><p ><span>Step1:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >打开终端,输入如下命令:</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><p ><span>$git config --global user.name “your_name” </span></p>
|
||||
<p></p>
|
||||
<p ><span>$git config --global user.email “your_email”</span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="900" border="0">
|
||||
<tr>
|
||||
<td><p >用户名和email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到)。 </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Tips: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >在碰到不熟悉的命令时,可以通过 <span>git help</span>命令查看git的用户手册,命令如下: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="297" border="0">
|
||||
<tr>
|
||||
<td width="291" align="center"><p ><span>$git help <command></span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="899" border="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step2:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >创建版本库(两种途径) </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="899" border="0">
|
||||
<tr>
|
||||
<td><p >(1)从远程服务器上克隆一个已存在的版本库到本地: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="522" border="0">
|
||||
<tr>
|
||||
<td width="516" align="center"><p ><span>$git clone http://user_name@domain/repo_path.git</span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td width="892"><p >其中,domain是服务器的域名(在trustie系统域名222.247.54.100),repo_path.git是版本库在服务器的相对路径(这个地址在trustie系统中会给出) </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >(2)在本地初始化一个版本库,比如将版本库命名为“DEMO”,使用名为/path/to/my/workspace的目录作为个人的工作区根目录,进入该目录后,执行<span>git init</span>创建版本库。 </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="327" border="0" align="left">
|
||||
<tr>
|
||||
<td width="321"><p ><span> $cd /path/to/my/workspace </span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $mkdir demo</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $cd demo </span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $git init </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >完成上述操作后,可以看到<span>git init</span>命令在工作区创建了隐藏目录 <span>.git</span>。这个隐藏的 .git目录就是git版本库(repository)。 </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step3:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >提交文件到本地仓库: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="258" border="0">
|
||||
<tr>
|
||||
<td width="252" align="center"><p ><span>$git add file1 file2 </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="897" border="0">
|
||||
<tr>
|
||||
<td><p >files是做了修改的文件,多个文件使用空格隔开。 </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="386" border="0">
|
||||
<tr>
|
||||
<td width="380" align="center"><p ><span>$git commit –m "commit message" </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="897" border="0">
|
||||
<tr>
|
||||
<td width="891"><p >通过<span>-m</span>参数设置提交说明为“<span>commit message</span>”,Git强制性的要求在提交过程中需要输入提交说明,可以使用<span>git log</span>命令来查看提交日志。 </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step4:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >将本地分支推送到远程仓库: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >上述操作仅仅是在本地建立了一个git版本库,为了协同工作,我们可以将其推送到远程服务器。 </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="610" border="0">
|
||||
<tr>
|
||||
<td width="604" align="center"><p ><span>$git remote add origin http://user_name@domain/repo_path.git </span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="896" border="0">
|
||||
<tr>
|
||||
<td><p >远程库别名为<span>origin</span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="292" border="0">
|
||||
<tr>
|
||||
<td width="328" align="center"><p ><span>$git push origin master </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="895" border="0">
|
||||
<tr>
|
||||
<td width="485"><p >将本地的master分支推送到origin的master分支 </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="896" border="0">
|
||||
<tr>
|
||||
<td width="900"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="894" border="0">
|
||||
<tr>
|
||||
<td><p ><span>Step5:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >将远程仓库的分支更新到本地: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >当项目小组有成员将其自己的代码推送到服务器,我们可以使用<span>git pull</span> (或者<span>git fetch</span>)获取更新后的代码。</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="279" border="0">
|
||||
<tr>
|
||||
<td width="273" align="center"><p ><span>$git pull origin master </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="893" border="0">
|
||||
<tr>
|
||||
<td><p >将远程库origin的master分支更新到本地的master分支 </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="891" border="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="831" border="0">
|
||||
<tr>
|
||||
<td width="825" align="right">——Trustie团队</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- end -->
|
|
@ -0,0 +1,245 @@
|
|||
<!-- added by baiyu -->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>无标题文档</title>
|
||||
|
||||
<style type="text/css">
|
||||
body table tr th {
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
font-family: "Comic Sans MS", cursive;
|
||||
}
|
||||
body table tr td {
|
||||
color: #333;
|
||||
}
|
||||
body table tr td {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
font-family: "Comic Sans MS", cursive;
|
||||
}
|
||||
body table tr td span {
|
||||
color: #039;
|
||||
}
|
||||
body p {
|
||||
font-size: 18px;
|
||||
color: #009;
|
||||
}
|
||||
body table tr td p {
|
||||
color: #333;
|
||||
font-family: "Comic Sans MS", cursive;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body><table width="898" border="0">
|
||||
<tr>
|
||||
<th width="890" align="center" valign="middle"> Git User Guide</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="892" border="0">
|
||||
<tr>
|
||||
<td width="886">We will use <span>git</span> which is a distributed version control and source code management system to submit our code, here is the submission method.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="456" border="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="450"><p ><span>Step1:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Enter the following command in the terminal:</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><p ><span>$git config --global user.name “your_name” </span></p>
|
||||
<p></p>
|
||||
<p ><span>$git config --global user.email “your_email”</span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository). </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Tips: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >You can read the user manual by enter " <span>git help</span> " command when you are confused, command as follows: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="297" border="0">
|
||||
<tr>
|
||||
<td width="291" align="center"><p ><span>$git help <command></span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step2:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Create a new repository by two ways, here we go </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >(1) The first way is clone a repository which is already exists from remote Server to local: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="522" border="0">
|
||||
<tr>
|
||||
<td width="516" align="center"><p ><span>$git clone http://user_name@domain/repo_path.git</span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td width="892"><p > The "domain" in the command means the server's domain name(the domain name in Trustie system is 222.247.54.100), "repo_path.git" is the relative path(this address will be given in Trustie) </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >(2) Initialize a repository on the local, we named repository as “DEMO” for example, use the directory "/path/to/my/workspace" as a root of personal workspace. </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >Enter the directory, execute the "<span>git init</span>" command to create the repository.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="327" border="0" align="left">
|
||||
<tr>
|
||||
<td width="321"><p ><span> $cd /path/to/my/workspace </span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $mkdir demo</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $cd demo </span></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span> $git init </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >After completed these operation, you can see "<span>git init</span> " command creates a hidden directory in the workspace and this hidden directory is the git repository. </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step3:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Submit the file to the local repository: </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="258" border="0">
|
||||
<tr>
|
||||
<td width="252" align="center"><p ><span>$git add file1 file2 </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >"file1" is the file which is already modified, multiple files separated by spaces. </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="388" border="0">
|
||||
<tr>
|
||||
<td width="380" align="center"><p ><span>$git commit –m "commit message" </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td width="891"><p >“<span>commit message</span>”is a submission instructions which is a mandatory requirement in the Git, you can use "<span>git log</span>" to list the commit log. </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p ><span>Step4:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Push the local branches to the remote repository: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >The operation we mentioned above is only to establish a local git repository, we can push it to the remote server in order to work together in the future. </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="610" border="0">
|
||||
<tr>
|
||||
<td width="604" align="center"><p ><span>$git remote add origin http://user_name@domain/repo_path.git </span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >In Git, we call remote repository as <span>origin</span> </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="292" border="0">
|
||||
<tr>
|
||||
<td width="328" align="center"><p ><span>$git push origin master </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td width="485"><p >Push the local master branch to the origin master branch . </p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td width="898"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p ><span>Step5:</span> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >Get the latest branch from the remote repository: </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p >When your team members push the code to the server, we can use "<span>git pull</span> " (or "<span>git fetch</span>") to obtain the modified code.。</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="279" border="0">
|
||||
<tr>
|
||||
<td width="273" align="center"><p ><span>$git pull origin master </span></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="898" border="0">
|
||||
<tr>
|
||||
<td><p >Pull the remote master branch to the local master branch.</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="894" border="0">
|
||||
<tr>
|
||||
<td width="888"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">--By Trustie Team</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- end -->
|
|
@ -1,3 +1,9 @@
|
|||
<!--add by huang-->
|
||||
<div style="padding-bottom: 10px">
|
||||
<%= 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' %>
|
||||
</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' %>
|
||||
|
@ -48,9 +54,7 @@
|
|||
<p class="buttons hide-when-print">
|
||||
|
||||
<%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<%= 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(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function l(:button_save),
|
||||
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }'); submit_query_form('query_form')",
|
||||
|
|
|
@ -117,6 +117,11 @@
|
|||
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
|
||||
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
|
||||
</td>
|
||||
<% if @project.identifier = 'trustie' %>
|
||||
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
|
||||
<%= link_to l(:label_user_response) ,project_feedback_path(@project) %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<!-- fq -->
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
<% if @jour.size >0 %>
|
||||
|
||||
<% for journal in @jour%>
|
||||
<table width="660px" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %></td>
|
||||
<td><table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong>
|
||||
<% if @user == User.current%>
|
||||
<span class="font_lighter"><%= l(:label_leave_me_message) %></span>
|
||||
<% else %>
|
||||
<span class="font_lighter"><%= l(:label_leave_others_message) %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time journal.created_on %></span></td>
|
||||
<td width="200" align="right" class="a">
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="line_under"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
<ul>
|
||||
</div>
|
|
@ -28,7 +28,8 @@ border:none
|
|||
<%= l(:text_repository_identifier_info).html_safe %></em>
|
||||
<% end %></p>
|
||||
<!-- <p><%= f.text_field :url, :size => 60, :required => true,:readonly=>true, :class=>'textbg'%></p> -->
|
||||
<!-- <p><%= f.password_field :upassword, :required =>true, :label=> :field_password %></p> -->
|
||||
<p><%= f.password_field :upassword, :required =>true, :label=> :field_password %>
|
||||
<em class="info"><%= l(:label_upassword_info)%></em></p>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %>
|
||||
|
|
|
@ -4,10 +4,18 @@
|
|||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
|
||||
<% project_path_cut = 40 %>
|
||||
<% ip = "repository.trustie.net" %><!--Added by young For formatting project's path-->
|
||||
<h3>
|
||||
<%= render :partial => 'breadcrumbs',
|
||||
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
|
||||
<div style="font-size:11px;">
|
||||
<%if @repository.type.to_s=="Repository::Git"%>
|
||||
<td>http://<%= @repository.login.to_s %>@<%= ip %><%=h @repository.url.slice(project_path_cut, @repository.url.length) %></td><!--Modified by tanxianbo-->
|
||||
<%else %>
|
||||
<td><%=h @repository.url %></td>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if @repositories.size > 1 %>
|
||||
<p style=" word-wrap: break-word; word-break: break-all">
|
||||
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
|
||||
|
@ -68,6 +76,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
如何提交代码 <%= link_to('中文', ch_usage_path)%> <%= link_to('English', en_usage_path)%>
|
||||
|
||||
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
|
|
|
@ -1,58 +1,77 @@
|
|||
<!--modified by young-->
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
|
||||
<%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
|
||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="contextual" style="padding-right: 10px;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h3><%= h(@version.name) %></h3>
|
||||
|
||||
<div id="roadmap">
|
||||
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
|
||||
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
|
||||
<h3>
|
||||
<%= render :partial => 'breadcrumbs',
|
||||
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
|
||||
<% if @repositories.size > 1 %>
|
||||
<p style=" word-wrap: break-word; word-break: break-all">
|
||||
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
|
||||
link_to h(repo.name),
|
||||
{:controller => 'repositories', :action => 'show',
|
||||
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
||||
:class => 'repository' + (repo == @repository ? ' selected' : '')
|
||||
}.join(' | ').html_safe %>)</p>
|
||||
<% end %>
|
||||
</h3>
|
||||
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<% if @issues.present? %>
|
||||
<%= form_tag({}) do -%>
|
||||
<table class="list related-issues">
|
||||
<caption>»<%= l(:label_related_issues) %></caption>
|
||||
<%- @issues.each do |issue| -%>
|
||||
<tr class="hascontextmenu">
|
||||
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
|
||||
<td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
||||
</tr>
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<% if @changesets && !@changesets.empty? %>
|
||||
<h3><%= l(:label_latest_revision_plural) %></h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil }%>
|
||||
<% end %>
|
||||
<p>
|
||||
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
|
||||
sep = '' %>
|
||||
<% if @repository.supports_all_revisions? && @path.blank? %>
|
||||
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param %>
|
||||
<% sep = '|' %>
|
||||
<% end %>
|
||||
<% if @repository.supports_directory_revisions? &&
|
||||
( has_branches || !@path.blank? || !@rev.blank? ) %>
|
||||
<%= sep %>
|
||||
<%= link_to l(:label_view_revisions),
|
||||
:action => 'changes',
|
||||
:path => to_path_param(@path),
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => @rev %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @repository.supports_all_revisions? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(
|
||||
:atom, params.merge(
|
||||
{:format => 'atom', :action => 'revisions',
|
||||
:id => @project, :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom',
|
||||
:url => {:action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
<% end %>
|
||||
|
||||
<div class="splitcontent">
|
||||
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
||||
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= l(:field_estimated_hours) %></th>
|
||||
<td class="total-hours"><%= html_hours(l_hours(@version.estimated_hours)) %></td>
|
||||
</tr>
|
||||
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
||||
<tr>
|
||||
<th><%= l(:label_spent_time) %></th>
|
||||
<td class="total-hours"><%= html_hours(l_hours(@version.spent_hours)) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<div id="status_by" style="margin-top:10px;"><!--by young-->
|
||||
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= call_hook :view_versions_show_bottom, :version => @version %>
|
||||
|
||||
<% html_title @version.name %>
|
||||
<% html_title(l(:label_repository)) -%>
|
||||
|
|
|
@ -217,8 +217,53 @@ software development and software crowdsourcing.</td></tr>
|
|||
</table>
|
||||
</div>
|
||||
<!--model-->
|
||||
|
||||
<!-- fq -->
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- end -->
|
||||
|
||||
|
||||
<div>
|
||||
<table width="700" border="0" align="center" style="padding-top: 100px">
|
||||
<tr><td colspan="5" align="center" style="padding-bottom: 10px; font-size: 18px; font-color: #5c5c5c ; font-family: 微软雅黑">朋友,系统仍在不断完善,有意见和建议请 <strong><%= toggle_link '点击我', 'put-bid-form', {:focus => 'new_form_project_message'} %></strong></td></tr>
|
||||
<tr><td colspan="5" align="center" ><div class="homepage_underline"></div></td></tr>
|
||||
<tr><td colspan="5" align="center">
|
||||
<div id="put-bid-form" style="display: none">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'add_project_respond'}) do |f|%>
|
||||
|
||||
<table border="0" width="525px" align="center" >
|
||||
|
||||
<tr>
|
||||
<td><%= f.text_area 'project_message', :rows => 3, :cols => 65, :value => "#{l(:label_leave_a_message)}", :onfocus => "clearInfo('new_form_project_message','#{l(:label_leave_a_message)}')", :onblur => "showInfo('new_form_project_message','#{l(:label_leave_a_message)}')", :style => "resize: none;", :class => 'noline'%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="525px" align="center">
|
||||
<tr>
|
||||
<td align="right"> <%= submit_tag l(:label_responses), :name => nil , :class => "bid_btn" %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr align="center">
|
||||
<td><%= link_to image_tag("/images/welcome/1.png", weight:"190px", height:"190px"), :controller => 'projects', :action => 'index' %></td>
|
||||
<td width="65"></td>
|
||||
|
@ -262,8 +307,12 @@ software development and software crowdsourcing.</td></tr>
|
|||
<td width="65"></td>
|
||||
<td width="190"><%= l(:label_milestone_description) %></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 40px"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1245,4 +1245,5 @@ en:
|
|||
label_tags_numbers: Tag numbers:
|
||||
label_max_number: Must be at most 25 characters long.
|
||||
label_all_revisions: All revisions:
|
||||
label_repository_name: Repository name
|
||||
label_repository_name: Repository name
|
||||
label_upassword_info: The password can be shared in the group
|
||||
|
|
|
@ -1257,4 +1257,5 @@ zh:
|
|||
label_tags_user_mail: 用户邮箱:
|
||||
label_tags_numbers: Tag统计:
|
||||
label_max_number: 至多25个字符。
|
||||
label_all_revisions: 所有版本:
|
||||
label_all_revisions: 所有版本:
|
||||
label_upassword_info: 该密码在项目组内可共享
|
||||
|
|
|
@ -27,6 +27,10 @@ RedmineApp::Application.routes.draw do
|
|||
get "praise_tread/tread_plus"
|
||||
|
||||
root :to => 'welcome#index', :as => 'home'
|
||||
|
||||
#added by baiyu
|
||||
match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage'
|
||||
match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage'
|
||||
|
||||
|
||||
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
||||
|
@ -131,6 +135,7 @@ RedmineApp::Application.routes.draw do
|
|||
# get 'on', :action => 'on', :as => 'on'
|
||||
get 'file', :action => 'file', :as => 'file'
|
||||
get 'statistics', :action => 'statistics', :as => 'statistics'
|
||||
get 'feedback', :action => 'feedback'
|
||||
#end
|
||||
|
||||
post 'modules'
|
||||
|
@ -141,6 +146,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'copy', :via => [:get, :post]
|
||||
end
|
||||
|
||||
|
||||
#by young
|
||||
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
|
||||
# match '/focus', :controller => 'projects', :action => 'focus', :as => 'focus', :via => :get
|
||||
|
@ -430,6 +436,8 @@ RedmineApp::Application.routes.draw do
|
|||
match 'bids/new_bid', :controller => 'bids', :action => 'new_bid'
|
||||
match 'bids/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
||||
match 'bids/:id/add', :controller => 'bids', :action => 'add'
|
||||
match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond'
|
||||
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
||||
## 测试用
|
||||
# match 'test/index', :controller => 'test', :action => 'index'
|
||||
# added by young
|
||||
|
|
|
@ -256,17 +256,18 @@ Redmine::MenuManager.map :project_menu do |menu|
|
|||
# menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
|
||||
# menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id,
|
||||
# :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
|
||||
# menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
|
||||
# :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
|
||||
# menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
|
||||
# :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
|
||||
menu.push :files, { :controller => 'files', :action => 'index' }, :caption => :label_file_new, :param => :project_id
|
||||
menu.push :repository, { :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil },
|
||||
:if => Proc.new { |p| p.repository && !p.repository.new_record? }
|
||||
:if => Proc.new { |p| p.repository && !p.repository.new_record? }
|
||||
menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
|
||||
|
||||
end
|
||||
#end
|
||||
#added by young
|
||||
Redmine::MenuManager.map :user_menu do |menu|
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :activity, {:controller => 'users', :action => 'show' }
|
||||
menu.push :project, {:controller => 'users', :action => 'user_projects'}
|
||||
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
|
||||
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
|
||||
|
|
|
@ -11,7 +11,6 @@ h4 {border-bottom: 1px dotted #bbb;}
|
|||
|
||||
/*new by huang*/
|
||||
/**/
|
||||
|
||||
.welcome_logo{
|
||||
float: left;
|
||||
padding-left: 5px;
|
||||
|
@ -351,6 +350,16 @@ ul.tool li{list-style-type:none;
|
|||
overflow:hidden;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.homepage_underline{
|
||||
margin:1;
|
||||
padding:1;
|
||||
width:240px;
|
||||
height:1px;
|
||||
background-color:#c6e9fe;
|
||||
overflow:hidden;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.line_under{
|
||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue