parent
8dd2d4a39a
commit
e7716912b5
|
@ -0,0 +1,11 @@
|
||||||
|
#added by baiyu
|
||||||
|
class GitUsageController < ApplicationController
|
||||||
|
def ch_usage
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def en_usage
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
#end
|
|
@ -22,7 +22,7 @@ class ProjectsController < ApplicationController
|
||||||
# menu_item :settings, :only => :settings
|
# menu_item :settings, :only => :settings
|
||||||
|
|
||||||
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
|
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 :authorize_global, :only => [:new, :create]
|
||||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
|
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
|
||||||
#by young
|
#by young
|
||||||
|
@ -123,6 +123,16 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
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
|
def new
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
|
|
|
@ -107,6 +107,15 @@ class WordsController < ApplicationController
|
||||||
end
|
end
|
||||||
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
|
private
|
||||||
|
|
||||||
def find_user
|
def find_user
|
||||||
|
|
|
@ -51,6 +51,9 @@ class Project < ActiveRecord::Base
|
||||||
has_one :repository, :conditions => ["is_default = ?", true]
|
has_one :repository, :conditions => ["is_default = ?", true]
|
||||||
has_many :repositories, :dependent => :destroy
|
has_many :repositories, :dependent => :destroy
|
||||||
has_many :changesets, :through => :repository
|
has_many :changesets, :through => :repository
|
||||||
|
# added by fq
|
||||||
|
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||||
|
# end
|
||||||
#ADDED BY NIE
|
#ADDED BY NIE
|
||||||
has_many :project_infos, :dependent => :destroy
|
has_many :project_infos, :dependent => :destroy
|
||||||
#end
|
#end
|
||||||
|
@ -128,6 +131,14 @@ class Project < ActiveRecord::Base
|
||||||
end
|
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)
|
def initialize(attributes=nil, *args)
|
||||||
super
|
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 -->
|
|
@ -117,6 +117,11 @@
|
||||||
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
|
<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) %>
|
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</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>
|
|
@ -76,6 +76,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
如何提交代码 <%= link_to('中文', ch_usage_path)%> <%= link_to('English', en_usage_path)%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
|
@ -217,8 +217,53 @@ software development and software crowdsourcing.</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!--model-->
|
<!--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>
|
<div>
|
||||||
<table width="700" border="0" align="center" style="padding-top: 100px">
|
<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">
|
<tr align="center">
|
||||||
<td><%= link_to image_tag("/images/welcome/1.png", weight:"190px", height:"190px"), :controller => 'projects', :action => 'index' %></td>
|
<td><%= link_to image_tag("/images/welcome/1.png", weight:"190px", height:"190px"), :controller => 'projects', :action => 'index' %></td>
|
||||||
<td width="65"></td>
|
<td width="65"></td>
|
||||||
|
@ -262,8 +307,12 @@ software development and software crowdsourcing.</td></tr>
|
||||||
<td width="65"></td>
|
<td width="65"></td>
|
||||||
<td width="190"><%= l(:label_milestone_description) %></td>
|
<td width="190"><%= l(:label_milestone_description) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding-top: 40px"></div>
|
<div style="padding-top: 40px"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,10 @@ RedmineApp::Application.routes.draw do
|
||||||
|
|
||||||
root :to => 'welcome#index', :as => 'home'
|
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]
|
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
||||||
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
||||||
|
@ -131,6 +135,7 @@ RedmineApp::Application.routes.draw do
|
||||||
# get 'on', :action => 'on', :as => 'on'
|
# get 'on', :action => 'on', :as => 'on'
|
||||||
get 'file', :action => 'file', :as => 'file'
|
get 'file', :action => 'file', :as => 'file'
|
||||||
get 'statistics', :action => 'statistics', :as => 'statistics'
|
get 'statistics', :action => 'statistics', :as => 'statistics'
|
||||||
|
get 'feedback', :action => 'feedback'
|
||||||
#end
|
#end
|
||||||
|
|
||||||
post 'modules'
|
post 'modules'
|
||||||
|
@ -141,6 +146,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'copy', :via => [:get, :post]
|
match 'copy', :via => [:get, :post]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#by young
|
#by young
|
||||||
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
|
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
|
||||||
# match '/focus', :controller => 'projects', :action => 'focus', :as => 'focus', :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/new_bid', :controller => 'bids', :action => 'new_bid'
|
||||||
match 'bids/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
match 'bids/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
||||||
match 'bids/:id/add', :controller => 'bids', :action => 'add'
|
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'
|
# match 'test/index', :controller => 'test', :action => 'index'
|
||||||
# added by young
|
# added by young
|
||||||
|
|
|
@ -262,6 +262,7 @@ Redmine::MenuManager.map :project_menu do |menu|
|
||||||
menu.push :repository, { :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil },
|
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
|
menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
|
||||||
|
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
#added by young
|
#added by young
|
||||||
|
|
|
@ -350,6 +350,16 @@ ul.tool li{list-style-type:none;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
margin-top: 10px;
|
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{
|
.line_under{
|
||||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue