diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 47c65c052..f89e9a4dd 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -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 "+
- " \n"+
- "Require group "+params[:user][:login]+"-write \n "+
- " \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 "+
+ # " \n"+
+ # "Require group "+params[:user][:login]+"-write \n "+
+ # " \n ' >>"+
+ # @root_path+"htdocs/"+params[:user][:login]+"/.htaccess"
end
case Setting.self_registration
diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb
new file mode 100644
index 000000000..69b0c7f55
--- /dev/null
+++ b/app/controllers/git_usage_controller.rb
@@ -0,0 +1,11 @@
+#added by baiyu
+class GitUsageController < ApplicationController
+ def ch_usage
+
+ end
+
+ def en_usage
+
+ end
+end
+#end
\ No newline at end of file
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 4fa516820..62a8e4a4e 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -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 "+
- " \n"+
- "Require group "+@user.login.to_s+"-write \n "+
- " \n ' >>"+
- @root_path+"htdocs/"+@user.login.to_s+"/.htaccess"
+
if @user.save
flash[:notice] = l(:notice_account_password_updated)
redirect_to my_account_path
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 9fa7ddda6..65b306024 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -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
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 413e36af1..a2167bdf9 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -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 "+
+ " \n"+
+ "Require group "+User.current.login.to_s+"-"+params[:repository][:identifier]+"-write \n "+
+ " \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'
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index 18371f9f8..49e32ba17 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -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
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 60b7d8bd2..2fe1f61dc 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -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
diff --git a/app/models/project.rb b/app/models/project.rb
index 97c4f7320..7af230aa4 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -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
diff --git a/app/views/git_usage/ch_usage.html.erb b/app/views/git_usage/ch_usage.html.erb
new file mode 100644
index 000000000..dc5cf23ee
--- /dev/null
+++ b/app/views/git_usage/ch_usage.html.erb
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+无标题文档
+
+
+
+
+
+
+
+
+ 我们将使用 git 这个分布式版本控制系统来提交代码,下面就来介绍一下代码的提交方法。
+
+
+
+
+
+
+ Step1:
+
+
+ 打开终端,输入如下命令:
+
+
+ $git config --global user.name “your_name”
+
+ $git config --global user.email “your_email”
+
+
+
+
+ 用户名和email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到)。
+
+
+
+
+
+ Tips:
+
+
+ 在碰到不熟悉的命令时,可以通过 git help 命令查看git的用户手册,命令如下:
+
+
+
+
+ $git help <command>
+
+
+
+
+
+
+
+ Step2:
+
+
+ 创建版本库(两种途径)
+
+
+
+
+ (1)从远程服务器上克隆一个已存在的版本库到本地:
+
+
+
+
+ $git clone http://user_name@domain/repo_path.git
+
+
+
+
+ 其中,domain是服务器的域名(在trustie系统域名222.247.54.100),repo_path.git是版本库在服务器的相对路径(这个地址在trustie系统中会给出)
+
+
+
+
+
+ (2)在本地初始化一个版本库,比如将版本库命名为“DEMO”,使用名为/path/to/my/workspace的目录作为个人的工作区根目录,进入该目录后,执行git init 创建版本库。
+
+
+
+
+ $cd /path/to/my/workspace
+
+
+ $mkdir demo
+
+
+ $cd demo
+
+
+ $git init
+
+
+
+
+
+
+ 完成上述操作后,可以看到git init 命令在工作区创建了隐藏目录 .git 。这个隐藏的 .git目录就是git版本库(repository)。
+
+
+
+
+
+ Step3:
+
+
+ 提交文件到本地仓库:
+
+
+
+
+ $git add file1 file2
+
+
+
+
+ files是做了修改的文件,多个文件使用空格隔开。
+
+
+
+
+ $git commit –m "commit message"
+
+
+
+
+ 通过-m 参数设置提交说明为“commit message ”,Git强制性的要求在提交过程中需要输入提交说明,可以使用git log 命令来查看提交日志。
+
+
+
+
+
+ Step4:
+
+
+ 将本地分支推送到远程仓库:
+
+
+ 上述操作仅仅是在本地建立了一个git版本库,为了协同工作,我们可以将其推送到远程服务器。
+
+
+
+
+ $git remote add origin http://user_name@domain/repo_path.git
+
+
+
+
+
+ $git push origin master
+
+
+
+
+ 将本地的master分支推送到origin的master分支
+
+
+
+
+
+ Step5:
+
+
+ 将远程仓库的分支更新到本地:
+
+
+ 当项目小组有成员将其自己的代码推送到服务器,我们可以使用git pull (或者git fetch )获取更新后的代码。
+
+
+
+
+ $git pull origin master
+
+
+
+
+ 将远程库origin的master分支更新到本地的master分支
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/git_usage/en_usage.html.erb b/app/views/git_usage/en_usage.html.erb
new file mode 100644
index 000000000..9579ae887
--- /dev/null
+++ b/app/views/git_usage/en_usage.html.erb
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+无标题文档
+
+
+
+
+
+
+
+
+ We will use git which is a distributed version control and source code management system to submit our code, here is the submission method.
+
+
+
+
+
+
+
+
+ Step1:
+
+
+ Enter the following command in the terminal:
+
+
+ $git config --global user.name “your_name”
+
+ $git config --global user.email “your_email”
+
+
+
+
+ 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).
+
+
+
+
+
+ Tips:
+
+
+ You can read the user manual by enter " git help " command when you are confused, command as follows:
+
+
+
+
+ $git help <command>
+
+
+
+
+
+
+
+ Step2:
+
+
+ Create a new repository by two ways, here we go
+
+
+
+
+ (1) The first way is clone a repository which is already exists from remote Server to local:
+
+
+
+
+ $git clone http://user_name@domain/repo_path.git
+
+
+
+
+ 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)
+
+
+
+
+
+ (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.
+
+
+
+
+ Enter the directory, execute the "git init " command to create the repository.
+
+
+
+
+ $cd /path/to/my/workspace
+
+
+ $mkdir demo
+
+
+ $cd demo
+
+
+ $git init
+
+
+
+
+
+
+ After completed these operation, you can see "git init " command creates a hidden directory in the workspace and this hidden directory is the git repository.
+
+
+
+
+
+ Step3:
+
+
+ Submit the file to the local repository:
+
+
+
+
+ $git add file1 file2
+
+
+
+
+ "file1" is the file which is already modified, multiple files separated by spaces.
+
+
+
+
+ $git commit –m "commit message"
+
+
+
+
+ “commit message ”is a submission instructions which is a mandatory requirement in the Git, you can use "git log " to list the commit log.
+
+
+
+
+
+ Step4:
+
+
+ Push the local branches to the remote repository:
+
+
+ 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.
+
+
+
+
+ $git remote add origin http://user_name@domain/repo_path.git
+
+
+
+
+ In Git, we call remote repository as origin
+
+
+
+
+ $git push origin master
+
+
+
+
+ Push the local master branch to the origin master branch .
+
+
+
+
+
+ Step5:
+
+
+ Get the latest branch from the remote repository:
+
+
+ When your team members push the code to the server, we can use "git pull " (or "git fetch ") to obtain the modified code.。
+
+
+
+
+ $git pull origin master
+
+
+
+
+ Pull the remote master branch to the local master branch.
+
+
+
+
+
+
+
+ --By Trustie Team
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index b16159ce7..8294c6562 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -1,3 +1,9 @@
+
+
+ <%= 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' %>
+
+
<% 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 @@
<%= 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')",
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index 45034667f..822e99787 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -117,6 +117,11 @@
<%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
+ <% if @project.identifier = 'trustie' %>
+
<%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
+ <%= link_to l(:label_user_response) ,project_feedback_path(@project) %>
+
+ <% end %>
diff --git a/app/views/projects/feedback.html.erb b/app/views/projects/feedback.html.erb
new file mode 100644
index 000000000..8f316527a
--- /dev/null
+++ b/app/views/projects/feedback.html.erb
@@ -0,0 +1,38 @@
+
+<%= l(:label_user_response) %>
+<% if @jour.size >0 %>
+
+<% for journal in @jour%>
+
+
+ <%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %>
+
+
+ <%=link_to journal.user, user_path(journal.user)%>
+ <% if @user == User.current%>
+ <%= l(:label_leave_me_message) %>
+ <% else %>
+ <%= l(:label_leave_others_message) %>
+ <% end %>
+
+
+
+ <%= textilizable journal.notes%>
+
+
+ <%= format_time journal.created_on %>
+
+
+
+
+
+
+
+<% end %>
+<% end %>
+
+
\ No newline at end of file
diff --git a/app/views/repositories/_form_create.html.erb b/app/views/repositories/_form_create.html.erb
index 9815db08b..89ae6ffd0 100644
--- a/app/views/repositories/_form_create.html.erb
+++ b/app/views/repositories/_form_create.html.erb
@@ -28,7 +28,8 @@ border:none
<%= l(:text_repository_identifier_info).html_safe %>
<% end %>
-
+<%= f.password_field :upassword, :required =>true, :label=> :field_password %>
+ <%= l(:label_upassword_info)%>
<%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %>
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index f6a0ef6c4..46713e9c6 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -4,10 +4,18 @@
<%= render :partial => 'navigation' %>
-
+<% project_path_cut = 40 %>
+<% ip = "repository.trustie.net" %>
<%= render :partial => 'breadcrumbs',
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
+
+ <%if @repository.type.to_s=="Repository::Git"%>
+
http://<%= @repository.login.to_s %>@<%= ip %><%=h @repository.url.slice(project_path_cut, @repository.url.length) %>
+ <%else %>
+ <%=h @repository.url %>
+ <% end %>
+
<% if @repositories.size > 1 %>
(<%= 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 %>
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb
index 2bc1eb90d..f6a0ef6c4 100644
--- a/app/views/versions/show.html.erb
+++ b/app/views/versions/show.html.erb
@@ -1,58 +1,77 @@
-
-
-<%= 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 }) %>
+
+
+ <%= render :partial => 'navigation' %>
-
<%= h(@version.name) %>
-
-<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
-<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
+
+ <%= render :partial => 'breadcrumbs',
+ :locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
+ <% if @repositories.size > 1 %>
+
+ (<%= 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 %>)
+ <% end %>
+
+<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
+ <%= render :partial => 'dir_list' %>
+<% end %>
+<%= render_properties(@properties) %>
-<% if @issues.present? %>
-<%= form_tag({}) do -%>
-
-<% end %>
-<%= context_menu issues_context_menu_path %>
-<% end %>
+
+ <% 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 %>
+
+ <% 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 %>
-
-<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
-
<%= l(:label_time_tracking) %>
-
-
- <%= l(:field_estimated_hours) %>
- <%= html_hours(l_hours(@version.estimated_hours)) %>
-
-<% if User.current.allowed_to?(:view_time_entries, @project) %>
-
- <%= l(:label_spent_time) %>
- <%= html_hours(l_hours(@version.spent_hours)) %>
-
-<% 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 %>
<% end %>
-
-<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
-
-
-
-<%= call_hook :view_versions_show_bottom, :version => @version %>
-<% html_title @version.name %>
+<% content_for :header_tags do %>
+ <%= stylesheet_link_tag "scm" %>
+<% end %>
+
+<% html_title(l(:label_repository)) -%>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index a8a42a261..7231eefc5 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -217,8 +217,53 @@ software development and software crowdsourcing.
+
+
+
+
+
+
+
+
+
+
+ 朋友,系统仍在不断完善,有意见和建议请 <%= toggle_link '点击我', 'put-bid-form', {:focus => 'new_form_project_message'} %>
+
+
+
+
<%= link_to image_tag("/images/welcome/1.png", weight:"190px", height:"190px"), :controller => 'projects', :action => 'index' %>
@@ -262,8 +307,12 @@ software development and software crowdsourcing.
<%= l(:label_milestone_description) %>
+
+
+
+
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 838e74d92..c04402ce9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -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
\ No newline at end of file
+ label_repository_name: Repository name
+ label_upassword_info: The password can be shared in the group
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 6d220779d..383d3347f 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1257,4 +1257,5 @@ zh:
label_tags_user_mail: 用户邮箱:
label_tags_numbers: Tag统计:
label_max_number: 至多25个字符。
- label_all_revisions: 所有版本:
\ No newline at end of file
+ label_all_revisions: 所有版本:
+ label_upassword_info: 该密码在项目组内可共享
diff --git a/config/routes.rb b/config/routes.rb
index 1f82dc520..4ff256bad 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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
diff --git a/lib/redmine.rb b/lib/redmine.rb
index d41b6b969..ff1e175c8 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -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'}
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index d599860f2..556ee2067 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -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);
}