From 8ec2dc3196ebda4f3ccaa12cc15ce56413f9a655 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 13:53:35 +0800 Subject: [PATCH 01/30] =?UTF-8?q?=E5=A4=9A=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E6=83=85=E5=86=B5=EF=BC=9A=201=E3=80=81=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B9=E7=9B=AE=E6=8F=90=E4=BE=9B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=202=E3=80=81=E6=96=B0=E5=BB=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC=E5=BA=93=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 22 ++++++++++ .../settings/_new_repositories.html.erb | 43 +++++++------------ .../projects/settings/_rep_forge.html.erb | 38 ++++++++++++++++ .../projects/settings/_rep_gitlab.html.erb | 26 +++++++++++ public/stylesheets/public.css | 1 + public/stylesheets/repository.css | 9 ++++ 6 files changed, 111 insertions(+), 28 deletions(-) create mode 100644 app/views/projects/settings/_rep_forge.html.erb create mode 100644 app/views/projects/settings/_rep_gitlab.html.erb diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 41f25d1a3..c76006def 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -117,6 +117,28 @@ module ProjectsHelper end end + # 判断版本库是否为gitlab + def rep_is_gitlab?(project) + rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") + return rep.blank? ? true :false + end + + # 获取新增gitlab版本库 + def rep_gitlab(project) + rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") + end + + # 获取新项目的版本库地址 + def rep_gitlab_url(project) + gitlab_address = Redmine::Configuration['gitlab_address'] + url = gitlab_address.to_s+"/"+project.owner.to_s+"/"+project.identifier+"."+"git" + end + + # # 获取Forge历史版本库 + def rep_forge(project) + rep = Repository.where("project_id =? and type =?", project, "Repository::Git") + end + # Added by young def course_settings_tabs tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'}, diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index bfb87b16a..c6ddb9fca 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -8,39 +8,26 @@ <% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %> <% ip = RepositoriesHelper::REPO_IP_ADDRESS %> <% if @project.repositories.any? %> + <%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> + <%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> +
历史版本库
- - - - - - - - - <% @project.repositories.sort.each do |repository| %> + <% rep_forge(@project).sort.each do |repository| %> - - - + + <%if repository.scm_name=="Git"%> - + <%else %> - + <% end %> - - <% end %> @@ -50,7 +37,7 @@ <% end %> <%# 新建版本库 %> -<% if @project.repositories.count == 0 %> +<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %> <% course_tag = @project.project_type %> diff --git a/app/views/projects/settings/_rep_forge.html.erb b/app/views/projects/settings/_rep_forge.html.erb new file mode 100644 index 000000000..e25849c38 --- /dev/null +++ b/app/views/projects/settings/_rep_forge.html.erb @@ -0,0 +1,38 @@ +
<%= l(:field_identifier) %> <%= l(:field_repository_is_default) %><%= l(:label_scm) %> <%= l(:label_repository_path) %>
- <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?) %> <%= checked_image repository.is_default? %><%=h repository.scm_name %> + <%= repository.identifier %><%=h repository.scm_name %> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%> + + <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %> + + <%=h truncate(repository.url,:length=>10) %><%=h truncate(repository.url,:length=>10) %> - <% if repository.scm_name=="Git"%> - <%if User.current.allowed_to?(:manage_repository, @project) %> - <%= link_to(l(:label_user_plural), committers_repository_path(repository)) %> - <% end %> - <% end %> - - <% if repository.login.to_s==User.current.login.to_s %> - <%= delete_new_link repository_path(repository) %> - <% end %>
+ + 历史版本 + + + + + + + + + <% rep_forge(project).sort.each do |repository| %> + + + + + <%if repository.scm_name=="Git"%> + + <%else %> + + <% end %> + + + + <% end %> + +
<%= l(:field_identifier) %> <%= l(:field_repository_is_default) %><%= l(:label_scm) %> <%= l(:label_repository_path) %>
+ <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?) %> <%= checked_image repository.is_default? %><%=h repository.scm_name %> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%><%=h truncate(repository.url,:length=>10) %> + <% if repository.scm_name=="Git"%> + <%if User.current.allowed_to?(:manage_repository, @project) %> + <%= link_to(l(:label_user_plural), committers_repository_path(repository)) %> + <% end %> + <% end %> + + <% if repository.login.to_s==User.current.login.to_s %> + <%= delete_new_link repository_path(repository) %> + <% end %>
\ No newline at end of file diff --git a/app/views/projects/settings/_rep_gitlab.html.erb b/app/views/projects/settings/_rep_gitlab.html.erb new file mode 100644 index 000000000..1de706b5d --- /dev/null +++ b/app/views/projects/settings/_rep_gitlab.html.erb @@ -0,0 +1,26 @@ +<% rep_gitlab(project).sort.each do |repository| %> + + + + + + + + + + + + + <%if repository.scm_name=="Gitlab"%> + + <%else %> + + <% end %> + +<% end %> + +
<%= l(:field_identifier) %><%= l(:label_scm) %> <%= l(:label_repository_path) %>
+ <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?) %> + <%=h repository.scm_name %> + <%=truncate(rep_gitlab_url(project), :length => 360) %> + <%=h truncate(repository.url,:length=>10) %>
\ No newline at end of file diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 0be7a6ff0..ec1b2dc2a 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -133,6 +133,7 @@ h4{ font-size:14px; color:#3b3b3b;} .w265{ width: 265px;} .w270{ width: 270px;} .w350 {width:350px;} +.w362 {width:362px;} .w430{ width:470px;} .w520{ width:520px;} .w543{ width:543px;} diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 71cbd47b6..6ed2ae924 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -275,4 +275,13 @@ li.commit .commit-row-info a { } li.commit .commit-row-info .committed_ago { display: inline-block; +} +.rep_history_title{ + text-align: center; + font-weight: bold; + font-size: 13px; + color: #7F7F7F; +} +.rep_history_grey{ + color: #7F7F7F; } \ No newline at end of file From eb3c65f1c621ecf0b5aacfa991e593912cce268c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 14:26:23 +0800 Subject: [PATCH 02/30] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98---=E9=A1=B9=E7=9B=AE=E5=B7=A6=E4=BE=A7=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E5=BB=BA=E7=89=88=E6=9C=AC=E5=BA=93=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 2 +- app/views/projects/_development_group.html.erb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index c76006def..90ddca99f 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -117,7 +117,7 @@ module ProjectsHelper end end - # 判断版本库是否为gitlab + # 判断版本库是否初始为gitlab def rep_is_gitlab?(project) rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") return rep.blank? ? true :false diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 1770291f5..e6ba39aa3 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -43,6 +43,9 @@
<% end %> From 83486c745e4b833af29114297b026a6ede7891f3 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 15:04:17 +0800 Subject: [PATCH 03/30] =?UTF-8?q?1=E3=80=81=E5=A6=82=E6=9E=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=96=B0=E5=A2=9E=E7=89=88=E6=9C=AC=E5=BA=93=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=93=BE=E6=8E=A5=E8=B7=B3=E8=87=B3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE--=E6=96=B0=E5=A2=9E=202=E3=80=81=E5=B7=B2=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E8=BF=87gitlab=E9=A1=B9=E7=9B=AE=E5=88=99=E8=B7=B3?= =?UTF-8?q?=E8=87=B3gitlab=20=E7=89=88=E6=9C=AC=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 10 +- app/helpers/application_helper.rb | 6 + app/helpers/projects_helper.rb | 6 - .../projects/_development_group.html.erb | 8 +- .../settings/_new_repositories.html.erb | 131 +++++++++--------- 5 files changed, 85 insertions(+), 76 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 8a1b3bbe0..e05e79205 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -215,11 +215,11 @@ update end end - unless @repository.gitlab? - # redirect_to to_gitlab_project_repository_path(@project, @repository) - render :to_gitlab - return - end + # unless @repository.gitlab? + # # redirect_to to_gitlab_project_repository_path(@project, @repository) + # render :to_gitlab + # return + # end #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 84364b4f6..01b126c26 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -609,6 +609,12 @@ module ApplicationHelper return @result end + # 判断版本库是否初始为gitlab + def rep_is_gitlab?(project) + rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") + return rep.blank? ? true :false + end + # 判断当前用户是否为项目管理员 def is_project_manager?(user_id, project_id) @result = false diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 90ddca99f..48766813c 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -117,12 +117,6 @@ module ProjectsHelper end end - # 判断版本库是否初始为gitlab - def rep_is_gitlab?(project) - rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") - return rep.blank? ? true :false - end - # 获取新增gitlab版本库 def rep_gitlab(project) rep = Repository.where("project_id =? and type =?", project, "Repository::Gitlab") diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index e6ba39aa3..67867ffbf 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -41,10 +41,14 @@ <%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %> <% if visible_repository?(@project) %> <% end %> diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index c6ddb9fca..1eeb571cf 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -7,74 +7,79 @@ <%= str = error_messages_for 'repository' %> <% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %> <% ip = RepositoriesHelper::REPO_IP_ADDRESS %> -<% if @project.repositories.any? %> - <%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> - <%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> -
历史版本库
- - - <% rep_forge(@project).sort.each do |repository| %> - - + <%else %> + <% end %> - -
  • - - - - <%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %> - <% unless @repository.identifier_frozen? %> - <%=l(:text_length_between,:min=>1,:max=>254)< - <% end %> -
  • -
    - - <%=l(:button_save)%> - <%=l(:button_cancel)%> - - <% end %> + + <% end %> + +
    +<%# 新建版本库 %> +
    + <% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %> + + + <% course_tag = @project.project_type %> + <% if User.current.allowed_to?(:manage_repository, @project) %> + + <%= link_to l(:label_repository_new_repos),"#" , :onclick=>"pro_st_show_ku();", :class => 'c_blue fl' %>

    + <% end %> +
    +
    + + <%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %> +
    +
      +
    • + + <%= select_tag('repository_scm', + options_for_select(["Git"],@repository.class.name.demodulize), + :data => {:remote => true, :method => 'get'})%> + <% if @repository && ! @repository.class.scm_available %> + <%= l(:text_scm_command_not_available) %> + <% end %> +
    • +
    • + + + + <%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %> + <% unless @repository.identifier_frozen? %> + <%=l(:text_length_between,:min=>1,:max=>254)< + <% end %> +
    • +
      +
    + <%=l(:button_save)%> + <%=l(:button_cancel)%> +
    + <% end %> + + <% end %> +
    + + <% if @project.repositories.any? %> + <%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> + <%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> +
    历史版本库
    + + + <% rep_forge(@project).sort.each do |repository| %> + + - - <%if repository.scm_name=="Git"%> - + <%if repository.scm_name=="Git"%> + - <%else %> - - <% end %> - - <% end %> - -
    <%= repository.identifier %><%=h repository.scm_name %><%=h repository.scm_name %> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %> - <%=h truncate(repository.url,:length=>10) %>
    -<% else %> -

    <%= l(:label_repository_no_data) %>

    -<% end %> - -<%# 新建版本库 %> -<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %> - - - <% course_tag = @project.project_type %> - <% if User.current.allowed_to?(:manage_repository, @project) %> - - <%= link_to l(:label_repository_new_repos),"#" , :onclick=>"pro_st_show_ku();", :class => 'c_blue fl' %>

    - <% end %> -
    -
    - - <%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %> -
    -
      -
    • - - <%= select_tag('repository_scm', - options_for_select(["Git"],@repository.class.name.demodulize), - :data => {:remote => true, :method => 'get'})%> - <% if @repository && ! @repository.class.scm_available %> - <%= l(:text_scm_command_not_available) %> +
    <%=h truncate(repository.url,:length=>10) %>
    + <% else %> +

    <%= l(:label_repository_no_data) %>

    + <% end %> + + -<% end %> From 4c174781b1e958306234a19195897cb4ec8c69f5 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 2 Nov 2015 15:21:53 +0800 Subject: [PATCH 04/30] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=20=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=20=E8=B5=84=E6=BA=90=E4=B8=8A=E4=BC=A0=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=EF=BC=8C=E7=9B=B4=E6=8E=A5=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BC=B9=E5=87=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_upload_show_project.html.erb | 4 ++-- app/views/files/create.js.erb | 2 +- app/views/layouts/base_projects.html.erb | 12 +++++++++++- app/views/projects/_development_group.html.erb | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/views/files/_upload_show_project.html.erb b/app/views/files/_upload_show_project.html.erb index 25a03b347..273aaec08 100644 --- a/app/views/files/_upload_show_project.html.erb +++ b/app/views/files/_upload_show_project.html.erb @@ -8,9 +8,9 @@ <%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> - <%= render :partial => 'attachement_list',:locals => {:project => project} %> + <%= render :partial => 'files/attachement_list',:locals => {:project => project} %>
    - <%= l(:button_cancel)%> + <%= l(:button_cancel)%> <%= l(:button_confirm)%> <% end %> diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 81810344e..f24d60811 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -22,7 +22,7 @@ $("#attachments_fields").children().remove(); $("#upload_file_count").text("未上传文件"); $('#upload_file_div').slideToggle('slow'); <% if @project %> - closeModal(); + hideModal(); $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>'); $("#project_files_count_info").html("<%= @all_attachments.count%>"); $("#project_files_count_nav").html("(<%= @all_attachments.count%>)") diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index b418be4ab..e06db1d0f 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -13,7 +13,7 @@ <%= javascript_heads %> <%= heads_for_theme %> <%= stylesheet_link_tag 'public', 'pleft', 'project','prettify','jquery/jquery-ui-1.9.2','header','repository' %> - <%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move' %> + <%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> @@ -223,6 +223,16 @@ } ); } + + function project_files_upload() + { + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_show_project',:locals => {:project => @project}) %>'); + showModal('ajax-modal', '513px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before(""); + $('#ajax-modal').parent().css("top","40%").css("left","36%"); + $('#ajax-modal').parent().addClass("popbox_polls"); + }
    123
    diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 1770291f5..1da51c6e4 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -34,7 +34,8 @@ <%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %> <% end %> <% if User.current.member_of?(@project) %> - <%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> + <%#= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %> + +上传资源 <% end %> <% end %> From 7980d92ff74fcd4637f8912938cdc971390d3f14 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 2 Nov 2015 15:46:21 +0800 Subject: [PATCH 05/30] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E7=BB=93=E6=9E=9C=E6=8C=89=E7=85=A7=E5=BC=80?= =?UTF-8?q?=E8=AF=BE=E6=97=B6=E9=97=B4=E3=80=81=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=80=92=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 0a3c61c90..1a561006a 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -107,7 +107,7 @@ class CoursesController < ApplicationController courses = Course.visible @courses = paginateHelper courses,10 else - courses = Course.visible.where("LOWER(name) like '%#{params[:name].to_s.downcase}%'") + courses = Course.visible.where("LOWER(name) like '%#{params[:name].to_s.downcase}%'").order("time desc, created_at desc") @courses = paginateHelper courses,10 end @name = params[:name] From 4d5d012ecf23385280122f6cbe3dbe2303b00b93 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 16:41:15 +0800 Subject: [PATCH 06/30] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 21 ++++--- .../settings/_new_repositories.html.erb | 63 ++++++++++--------- config/locales/commons/zh.yml | 2 +- config/locales/projects/zh.yml | 3 + public/stylesheets/project.css | 1 + public/stylesheets/public.css | 1 + public/stylesheets/repository.css | 2 +- 7 files changed, 52 insertions(+), 41 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index e05e79205..42e097180 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -215,11 +215,11 @@ update end end - # unless @repository.gitlab? - # # redirect_to to_gitlab_project_repository_path(@project, @repository) - # render :to_gitlab - # return - # end + unless @repository.gitlab? + # redirect_to to_gitlab_project_repository_path(@project, @repository) + render :to_gitlab + return + end #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? @@ -252,11 +252,16 @@ update project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT ip = RepositoriesHelper::REPO_IP_ADDRESS gitlab_address = Redmine::Configuration['gitlab_address'] - if @repository.type.to_s=="Repository::Gitlab" + if @repository.type.to_s == "Repository::Gitlab" @repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git" else - @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s+ - @repository.url.slice(project_path_cut, @repository.url.length).to_s + # 默认选择历史版本库情况 + rep = Repository.where("project_id =? and type =?", @project, "Repository::Gitlab") + unless rep.blank? + @repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+rep.identifier+"."+"git" + else + @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s + end end if @course_tag == 1 render :action => 'show', :layout => 'base_courses' diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 1eeb571cf..e614dc5fe 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -8,8 +8,9 @@ <% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %> <% ip = RepositoriesHelper::REPO_IP_ADDRESS %> <%# 新建版本库 %> -
    - <% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %> + +<% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %> + +<% end %> - <% end %> -
    - <% if @project.repositories.any? %> - <%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> - <%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> -
    历史版本库
    - - - <% rep_forge(@project).sort.each do |repository| %> - - + <%else %> + + <% end %> + + <% end %> + +
    +<% if @project.repositories.any? %> + <%= render :partial => 'projects/settings/rep_gitlab', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> + <%#= render :partial => 'projects/settings/rep_forge', :locals => {:project => @project, :ip => "ip", :project_path_cut => "project_path_cut" } %> +
    历史版本库
    + + + <% rep_forge(@project).sort.each do |repository| %> + + - - <%if repository.scm_name=="Git"%> - + <%if repository.scm_name=="Git"%> + - <%else %> - - <% end %> - - <% end %> - -
    <%= repository.identifier %><%=h repository.scm_name %><%=h repository.scm_name %> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %> - <%=h truncate(repository.url,:length=>10) %>
    - <% else %> -

    <%= l(:label_repository_no_data) %>

    - <% end %> +
    <%=h truncate(repository.url,:length=>10) %>
    +<% else %> +

    温馨提示:<%= l(:label_repository_no_data) %>

    +<% end %> diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 61bad2a00..3b5e9790e 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -200,7 +200,7 @@ zh: label_subject_empty: 主题不能为空 label_no_data: 没有任何数据可供显示 - label_repository_no_data: 您还没有创建版本库,每个项目只允许创建一个版本库! + label_repository_no_data: 每个项目只能创建一个版本库! # 项目、课程、用户公用 label_settings: 配置 label_information_plural: 信息 diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index cce03b13e..88a710633 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -88,6 +88,8 @@ zh: project_module_files: 资源库 project_module_repository: 版本库 project_module_create_repository: 创建版本库 + project_gitlab_create_repository: 新版本库 + label_project_more: 更多 project_module_news: 新闻 @@ -112,6 +114,7 @@ zh: label_project_overview: "项目简介" label_expend_information: 展开更多信息 label_project_create: "新建了项目" + lable_project_rep_create: 创建 # # 项目托管平台 diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index e769e14e4..2623fe65e 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -553,6 +553,7 @@ a:hover.member_btn{ background:#329cbd;} .pro_table tr td{ height:30px;} .pro_table_tit{ text-align:center; font-weight:bold;} .pro_table_on{ background:#f0fbff; } +.pro_table_on_forge{ background: #EAEAEA; } .pro_st_edit_issues{ display:none; margin-top:20px;} .pro_st_edit_issues ul li{ margin-bottom:10px;} .pro_st_edit_ban{ display:none; margin-top:20px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index ec1b2dc2a..0c4479907 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -71,6 +71,7 @@ h4{ font-size:14px; color:#3b3b3b;} .ml45{ margin-left:45px;} .ml55{ margin-left:55px;} .ml30{ margin-left:30px;} +.ml38{ margin-left:38px;} .ml60{ margin-left:60px;} .ml80{ margin-left:80px;} .ml90{ margin-left:90px;} diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 6ed2ae924..e2d636e2e 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -277,10 +277,10 @@ li.commit .commit-row-info .committed_ago { display: inline-block; } .rep_history_title{ - text-align: center; font-weight: bold; font-size: 13px; color: #7F7F7F; + padding-bottom: 10px; } .rep_history_grey{ color: #7F7F7F; From d57e01f17ee427fbeadde60411d4111161dcbdf0 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 2 Nov 2015 17:19:38 +0800 Subject: [PATCH 07/30] =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=90=8E=EF=BC=8C=E6=9B=B4=E6=96=B0=E8=80=81?= =?UTF-8?q?=E5=B8=88=E6=95=B0=E9=87=8F=E5=92=8C=E5=AD=A6=E7=94=9F=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/members/update.js.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/members/update.js.erb b/app/views/members/update.js.erb index c5ef983e7..7c27e39fc 100644 --- a/app/views/members/update.js.erb +++ b/app/views/members/update.js.erb @@ -2,6 +2,8 @@ $('#pro_st_tbc_03').html('<%= escape_javascript(render :partial => 'projects/settings/new_members') %>'); <%elsif @course%> $('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); +$("#teacher_number").html("<%= searchTeacherAndAssistant(@course).count %>") +$("#student_number").html("<%= studentCount(@course) %>"); <%end%> hideOnLoad(); From 636063c6cafdc287616310661da8a45a5a7c9c11 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 2 Nov 2015 17:22:09 +0800 Subject: [PATCH 08/30] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E8=A1=A8=E5=92=8C=E7=BB=84=E7=BB=87=E6=88=90=E5=91=98=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20151102083844_drop_organization.rb | 8 ++++++++ .../20151102084419_create_organization.rb | 18 ++++++++++++++++++ .../20151102090519_create_org_members.rb | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 db/migrate/20151102083844_drop_organization.rb create mode 100644 db/migrate/20151102084419_create_organization.rb create mode 100644 db/migrate/20151102090519_create_org_members.rb diff --git a/db/migrate/20151102083844_drop_organization.rb b/db/migrate/20151102083844_drop_organization.rb new file mode 100644 index 000000000..1abb0f6d9 --- /dev/null +++ b/db/migrate/20151102083844_drop_organization.rb @@ -0,0 +1,8 @@ +class DropOrganization < ActiveRecord::Migration + def up + drop_table :organizations + end + + def down + end +end diff --git a/db/migrate/20151102084419_create_organization.rb b/db/migrate/20151102084419_create_organization.rb new file mode 100644 index 000000000..af84ebee9 --- /dev/null +++ b/db/migrate/20151102084419_create_organization.rb @@ -0,0 +1,18 @@ +class CreateOrganization < ActiveRecord::Migration + def up + create_table :organizations do |t| + t.string :name + t.text :description + t.integer :creator_id + t.integer :home_id + t.string :domain + t.boolean :is_public + + t.timestamps + end + end + + def down + drop_table :organizations + end +end diff --git a/db/migrate/20151102090519_create_org_members.rb b/db/migrate/20151102090519_create_org_members.rb new file mode 100644 index 000000000..037d8a3c6 --- /dev/null +++ b/db/migrate/20151102090519_create_org_members.rb @@ -0,0 +1,14 @@ +class CreateOrgMembers < ActiveRecord::Migration + def up + create_table :org_members do |t| + t.integer :user_id + t.integer :organization_id + t.string :role + + end + end + + def down + drop_table :org_members + end +end From 36d61cd82f15e0b90cd56be44b22011ff422c9c1 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 17:36:45 +0800 Subject: [PATCH 09/30] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 18 ++++++------------ lib/tasks/update_rep_if_fault.rake | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 lib/tasks/update_rep_if_fault.rake diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 42e097180..0acf75c62 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -215,11 +215,11 @@ update end end - unless @repository.gitlab? - # redirect_to to_gitlab_project_repository_path(@project, @repository) - render :to_gitlab - return - end + # unless @repository.gitlab? + # # redirect_to to_gitlab_project_repository_path(@project, @repository) + # render :to_gitlab + # return + # end #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? @@ -255,13 +255,7 @@ update if @repository.type.to_s == "Repository::Gitlab" @repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git" else - # 默认选择历史版本库情况 - rep = Repository.where("project_id =? and type =?", @project, "Repository::Gitlab") - unless rep.blank? - @repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+rep.identifier+"."+"git" - else - @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s - end + @repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s + @repository.url.slice(project_path_cut, @repository.url.length).to_s end if @course_tag == 1 render :action => 'show', :layout => 'base_courses' diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake new file mode 100644 index 000000000..5353c7569 --- /dev/null +++ b/lib/tasks/update_rep_if_fault.rake @@ -0,0 +1,16 @@ +#coding=utf-8 + +namespace :rep_fault do + desc "update fault rep" + task :rep_update => :environment do + Project.all.each do |project| + if project.repositories.count > 0 + unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? + project.repositories.each do |repository| + repository.update_attributes(:is_default => true) + end + end + end + end + end +end \ No newline at end of file From f4b12d191a86d74f2832d5988ae00fd5388b0793 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 17:50:44 +0800 Subject: [PATCH 10/30] =?UTF-8?q?=E6=9B=B4=E6=96=B0repository=E7=9A=84type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/update_rep_if_fault.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake index 5353c7569..7bcf63c4c 100644 --- a/lib/tasks/update_rep_if_fault.rake +++ b/lib/tasks/update_rep_if_fault.rake @@ -7,10 +7,16 @@ namespace :rep_fault do if project.repositories.count > 0 unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? project.repositories.each do |repository| - repository.update_attributes(:is_default => true) + repository.update_attributes(:is_default => false) end end end end end + + desc "update ossean's data" + task :update_type => :environment do + repository = Repository.find(400) + repository.update_attributes(:type => "Repository::Git") + end end \ No newline at end of file From 1c45afac8932bac32838d1e519b5b7971c62fa9f Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 19:14:55 +0800 Subject: [PATCH 11/30] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=93=BE=E6=8E=A5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 5 +++++ app/views/projects/_development_group.html.erb | 2 +- .../projects/settings/_new_repositories.html.erb | 10 +++++++++- lib/tasks/update_rep_if_fault.rake | 13 +++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 01b126c26..b6c4ec91b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -615,6 +615,11 @@ module ApplicationHelper return rep.blank? ? true :false end + # 获取单一gitlab项目 + def gitlab_repository(project) + rep = Repository.where("project_id =? and type =?", project.id,"Repository::Gitlab" ).first + end + # 判断当前用户是否为项目管理员 def is_project_manager?(user_id, project_id) @result = false diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 67867ffbf..1f4fabde5 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -44,7 +44,7 @@ <% if rep_is_gitlab?(@project) %> <%= link_to l(:project_module_repository), {:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories'}, :class => "f14 c_blue02" %> <% else %> - <%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id }, :class => "f14 c_blue02" %> + <%= link_to l(:project_module_repository),({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).identifier}), :class => "f14 c_blue02" %> <% end %> (<%= @project.repositories.count %>) <% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) && rep_is_gitlab?(@project) %> diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index e614dc5fe..a62bbc42f 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -7,8 +7,16 @@ <%= str = error_messages_for 'repository' %> <% project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT %> <% ip = RepositoriesHelper::REPO_IP_ADDRESS %> +<%# 提示 %> +<% if @project.repositories.count>1 %> +
    + 项目管理员您好!近日平台完成了版本库升级,以后每个项目将唯一的对应一个版本库。请您按照以下步骤完成项目版本库的更新: +

    1. 点击下面的"创建版本库按钮",为本项目创建一个新的版本库;

    +

    2. 从本项目的历史版本库中选择一个您将使用的版本库,将其完整的克隆(clone)到本地,然后推送(push)到新建的版本库(注意不能仅推送代码,否则之前各开发者的提交记录将丢失)。

    +

    3. 本项目的历史版本库将在您新建版本库的一周内自动隐藏,如果您以后需要这些版本库,请与网站联系,我们将为您提供这些版本库的所有数据。

    +
    +<% end %> <%# 新建版本库 %> - <% if @project.repositories.count == 0 || rep_is_gitlab?(@project) %>
    diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake index 7bcf63c4c..1c1f5a36e 100644 --- a/lib/tasks/update_rep_if_fault.rake +++ b/lib/tasks/update_rep_if_fault.rake @@ -7,16 +7,17 @@ namespace :rep_fault do if project.repositories.count > 0 unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? project.repositories.each do |repository| - repository.update_attributes(:is_default => false) + repository.is_default =1 + repository.save end end end end end - desc "update ossean's data" - task :update_type => :environment do - repository = Repository.find(400) - repository.update_attributes(:type => "Repository::Git") - end + # desc "update ossean's data" + # task :update_type => :environment do + # repository = Repository.find(400) + # repository.update_attributes(:type => "Repository::Git") + # end end \ No newline at end of file From afd9d435c22ea2f09e86b0f07642b86ad651bc8e Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 19:20:59 +0800 Subject: [PATCH 12/30] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_repositories.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index a62bbc42f..a802faef1 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -44,7 +44,7 @@
  • - + *<%=l(:label_repository_name)%>: <%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %> <% unless @repository.identifier_frozen? %> <%=l(:text_length_between,:min=>1,:max=>254)< @@ -52,8 +52,8 @@
  • - <%=l(:lable_project_rep_create) %> - <%=l(:button_cancel)%> + <%=l(:lable_project_rep_create) %> + <%=l(:button_cancel)%>
    <% end %> From e0d5c948fa23816dc37f152c3b23be8988b1819c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 19:27:23 +0800 Subject: [PATCH 13/30] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_repositories.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index a802faef1..4653916a7 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -12,7 +12,7 @@
    项目管理员您好!近日平台完成了版本库升级,以后每个项目将唯一的对应一个版本库。请您按照以下步骤完成项目版本库的更新:

    1. 点击下面的"创建版本库按钮",为本项目创建一个新的版本库;

    -

    2. 从本项目的历史版本库中选择一个您将使用的版本库,将其完整的克隆(clone)到本地,然后推送(push)到新建的版本库(注意不能仅推送代码,否则之前各开发者的提交记录将丢失)。

    +

    2. 从本项目的历史版本库中选择一个您将使用的版本库,将其完整的克隆(clone)到本地(需要提供您之前设置的版本库口令),然后推送(push)到新建的版本库(注意不能仅推送代码,否则之前各开发者的提交记录将丢失)。

    3. 本项目的历史版本库将在您新建版本库的一周内自动隐藏,如果您以后需要这些版本库,请与网站联系,我们将为您提供这些版本库的所有数据。

    <% end %> From edf9b4a6b533839b3145b97338f02e43955de86f Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 20:01:19 +0800 Subject: [PATCH 14/30] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_repositories.html.erb | 2 +- public/javascripts/project.js | 5 +++++ public/stylesheets/public.css | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 4653916a7..5196fd8e8 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -72,7 +72,7 @@ <%= repository.identifier %> <%=h repository.scm_name %> <%if repository.scm_name=="Git"%> - <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %> diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 5ba7c7145..9344434eb 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -517,6 +517,11 @@ function jsCopy(){ e.select(); document.execCommand("Copy"); } +function jsCopy2(){ + var e=document.getElementById("copy_rep_content2"); + e.select(); + document.execCommand("Copy"); +} function zip(){ alert("该功能正在紧张的开发中,我们会争取在最短时间内上线,如若对您工作造成不便敬请谅解!") diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 0c4479907..49b2906aa 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -117,6 +117,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mb10{ margin-bottom:10px !important;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} +.pl5{ padding-left:5px;} .pt5{ padding-top:5px;} .pt10{ padding-top:10px;} .pb5{ padding-bottom: 5px;} From 4cd41e0a67de72ff59e1fa874e4db1de306f3f32 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 20:41:01 +0800 Subject: [PATCH 15/30] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 48766813c..51d1846d8 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -125,7 +125,7 @@ module ProjectsHelper # 获取新项目的版本库地址 def rep_gitlab_url(project) gitlab_address = Redmine::Configuration['gitlab_address'] - url = gitlab_address.to_s+"/"+project.owner.to_s+"/"+project.identifier+"."+"git" + url = gitlab_address.to_s+"/"+project.owner.to_s+"/"+ rep_gitlab(project).first.identifier+"."+"git" end # # 获取Forge历史版本库 From 3360a25a425b575c93b44834832e12b452e5bd00 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 10:28:13 +0800 Subject: [PATCH 16/30] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=20=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=20=E8=B5=84=E6=BA=90=E4=B8=8A=E4=BC=A0=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=EF=BC=8C=E7=9B=B4=E6=8E=A5=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BC=B9=E5=87=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 3 + app/views/files/_attachement_list.html.erb | 48 +++++----- app/views/files/_course_file.html.erb | 4 + .../files/_new_style_attachment_list.html.erb | 71 +++++++++++++++ app/views/files/_upload_course_files.erb | 42 +++++++++ app/views/files/_upload_show.html.erb | 4 +- app/views/files/_upload_show_project.html.erb | 4 +- app/views/layouts/base_courses.html.erb | 14 ++- public/javascripts/attachments.js | 88 +++++++++---------- public/stylesheets/courses.css | 5 +- public/stylesheets/new_user.css | 1 + public/stylesheets/project.css | 2 +- 12 files changed, 212 insertions(+), 74 deletions(-) create mode 100644 app/views/files/_new_style_attachment_list.html.erb create mode 100644 app/views/files/_upload_course_files.erb diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 057d962c8..1cd5b0f15 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 # Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # @@ -378,6 +379,8 @@ class FilesController < ApplicationController tag_name = l(:label_media) when "4" tag_name = l(:label_code) + when "6" + tag_name = "论文" else tag_name = "" end diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index 4c631d22f..01e5dca5f 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -1,26 +1,4 @@ -
    - -<% if defined?(container) && container && container.saved_attachments %> - <% container.attachments.each_with_index do |attachment, i| %> - - <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> - <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> - <%= l(:field_is_public)%>: - <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> - <%= if attachment.id.nil? - #待补充代码 - else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') - end - %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> - - <% end %> -<% end %> - -
    <% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> <% if @course %> @@ -68,3 +46,29 @@
    (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +
    + +
    + +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> +<% end %> + +
    +
    \ No newline at end of file diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 8283e15b7..4176b72d0 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -26,6 +26,9 @@ case 4: $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 4}) %>'); break; + case 6: + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 6}) %>'); + break; default: $('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 5}) %>'); } @@ -77,6 +80,7 @@ 软件 |  媒体 |  代码 |  + 论文 |  其他

    <% end %> diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb new file mode 100644 index 000000000..022486413 --- /dev/null +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -0,0 +1,71 @@ +<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%> + +<% if @course %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");', + :style => ie8? ? '': 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js'), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all) + } %> +<% else %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => ie8? ? '':'file_selector', + :multiple => true, + :onchange => 'addInputFiles(this);', + :style => ie8? ? '': 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js'), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all) + } %> +<% end %> + + + + + <%= l(:label_no_file_uploaded)%> + +(<%= l(:label_max_size) %>: +<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +
    +
    + +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> + <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> +<% end %> + +
    \ No newline at end of file diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb new file mode 100644 index 000000000..7eafcaabc --- /dev/null +++ b/app/views/files/_upload_course_files.erb @@ -0,0 +1,42 @@ + +
    +
    +

    <%= l(:label_upload_files)%>

    +
    + <%= error_messages_for 'attachment' %> + + + <%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> + + +
    + 课件 |  + 软件 |  + 媒体 |  + 代码 |  + 论文 |  + 其他 +
    +
    +
    + <%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %> +
    +
    + <%= l(:button_cancel)%> + <%= l(:button_confirm)%> + + <% end %> +
    + +
    + <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
    + + \ No newline at end of file diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index e11a4bf38..21cd94d8d 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -1,7 +1,7 @@ -
    +
    -

    <%= l(:label_upload_files)%>

    +

    <%= l(:label_upload_files)%>

    <%= error_messages_for 'attachment' %> diff --git a/app/views/files/_upload_show_project.html.erb b/app/views/files/_upload_show_project.html.erb index 273aaec08..8223f071e 100644 --- a/app/views/files/_upload_show_project.html.erb +++ b/app/views/files/_upload_show_project.html.erb @@ -1,7 +1,7 @@ -
    +
    -

    <%= l(:label_upload_files)%>

    +

    <%= l(:label_upload_files)%>

    <%= error_messages_for 'attachment' %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 98e8f378d..11eeb8659 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -138,7 +138,10 @@
    From 7f3d44ce63beae1f9ccc2d8be58856f9c993510a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 3 Nov 2015 10:52:32 +0800 Subject: [PATCH 19/30] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=9Agitlab=E5=92=8Ctrustie=E5=88=86=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0acf75c62..e25d01650 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -241,7 +241,7 @@ update #Modified by young # (show_error_not_found; return) unless @entries g = Gitlab.client - @changesets = g.get ("/projects/#{@project.gpid}/repository/commits") + @changesets = g.commits(@project.gpid) # @changesets = @repository.latest_changesets(@path, @rev) # @changesets_count = @repository.latest_changesets(@path, @rev).count @changesets_count = @changesets.count From 6f002613d0eb64ac117ad0e66e717eb8046cadd5 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 10:55:35 +0800 Subject: [PATCH 20/30] =?UTF-8?q?=E7=AD=94=E7=96=91=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/sidebar_bg.png | Bin 9913 -> 7281 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/sidebar_bg.png b/public/images/sidebar_bg.png index 9ceea0f9176902560fa21d8eddd17a372d761edd..e4d12da4dffa4b7d73d9767af38102b57212c1fa 100644 GIT binary patch literal 7281 zcmch5c|6oz`|v2;g%E{OmZp$B`xcXskfo69S;k0J7uCDkH~-=Vys3j-eSN)DrKSD+{G|Nkq>w%^X&Dt2l|ve`vXTIV zBr3qu*TG-X6Lslt3ffSVlaHI1uN%@+@Q|W|BNFYa4hAIs*A@_7|0e5+`b$lK!leBj zyrgBMt{!gbZ$LxC|2HTC@o#99?_KDBqs#)lpwf4tC?wj)2{4??r9)O;s#-o! z2VbO*84~I7w-!xYk-kWjE7D6)%T!VDiiMk}Gtv(w`WxQRP*u+ptLpDk#g{P?phFkde_*xFN5k0{moTm1M5!$ZIP6jjN4xLL;D_zJKF7{|8s= zA8`*|0pSI3)`t4HVW7@8eUJ#j-&zSd{FYUpPppC?nn;bzA9IE$H|#v)*f!drUx1BM(z)9+!_vAbP~DZJpCJI zoKskNQdgh~e1Xb`s_GclhCwkt&g~^N!^3G^s$WQuX`(O;WgRw=n`S#%C|HZ?eDk3Z z^L;O8&a-^D0n*INut0vLAhY^&)RMdJ0^$!ug2zGnbxh)ED(=g$*THUBc>;X}3~NYB zQnfBP2p92ByS>9oN3ZimY<1aD9fQ-$-*#c=kE!BQ=yubE<>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WaG?@V53J+hl!2UsF4*5lW3mc0G73WfseY4fvV{p*=}N4= z?lC#8)cHjo!u99W$Jqq;a>-XiAfMnIxm0zkR{nq7D(Uw&-JQSDwl~ zVowNDuy61w{N7zsn0mOnLVnK2^BZzf&P42dt8Fz-M#a8_|~`K zR0k)>+9|t;@Z%O$8ScIE_zUhA=CJGYfrQtS%#M?UKmn*^a@)BiUeFovIMs9~R8%-KfRPiEy&ar+H$$V<^-*fPYf3JH z;b~Ce`~FlG)}ekG4Xy`Tf-^o*W2nX4;NfW{^1V$vK1Dj(l&=B6;M&vRk{y$6gG(n(&u==T5lUwJh|1e@8|f9=JltvNL4vrL*A>?7k1ci%~W@tw85|=a@Qg zm{-odGxh@Q&GVh~ft&B06)RSdaOYdR>Raz67#3?<+PcHjT-Ef+(#h$5^tTj~Ril9- zj2^TXZ4f9fNNPKBqeWAhSPskiw=dV{It*h=0}En>Ah-TbbyQ1uyLhbt6XpKYw*nH> zKg%+IYa7ec=VA(HW}|LC32x0S4VpXoo|RfCz9BEq`z;Dat<){^^nN59NTqNZ8`*BT z3NlDT^`<&(4g-N$hEm5Q*qdc-!}tYebhVU}30HI|l3r4)Mc7yA`ck#l2?xNr1NwaZ zO;7fuLN~8&d3eq2>wq(puVsK@ Xn+&$9^GF@=?I574sG(3UXBP55+E<+Q From b84628af9df5a88d5ff0e40db5216aa350dd1e34 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:23:56 +0800 Subject: [PATCH 21/30] regist_btn color --- app/views/account/login.html.erb | 19 ++++++++++++++++--- public/stylesheets/new_user.css | 2 ++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index ed43f455a..fadf5e465 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -86,6 +86,9 @@ } function register(){ + if($("#loginUpButton").hasClass('loginUpDisableButton')){ + return; + } if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){ $("#main_reg_form").submit(); }else{ @@ -182,6 +185,16 @@ $('#main_login_form').submit(); } } + + function changeRegisterBtn(checkbox){ + if(checkbox.checked == true){ + $("#loginUpButton").removeClass('loginUpDisableButton'); + $("#loginUpButton").addClass('loginUpButton'); + }else{ + $("#loginUpButton").removeClass('loginUpButton') + $("#loginUpButton").addClass('loginUpDisableButton'); + } + }
    @@ -270,11 +283,11 @@
    - +
    我已阅读并接受Trustie服务协议条款
    -
    - 注册 +
    + 注册
    <% end %> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 8b3c8f3ce..0c7cda2c7 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -726,6 +726,8 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} .loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} .loginInButton:hover {background-color: #297fb8} .loginUpButton:hover {background-color: #297fb8} +.loginUpDisableButton {width:315px; height:40px; background-color:#C1C1C1; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} +.loginUpDisableButton:hover {background-color: #C1C1C1} .loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;} .loginSign {width:405px; background-color:#ffffff;} .loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;} From 3d87f65021c173a6dbc16e9f4f5abd92299637ce Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:27:43 +0800 Subject: [PATCH 22/30] new_feedback --- app/views/layouts/_new_feedback.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index fd25fc224..e3c0540fd 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -21,12 +21,11 @@ <% end %>
    -
    +
    <%#= l(:label_technical_support) %> - -

    请加入师姐师姐答疑群

    173184401

    +

    请加入师姐师姐答疑群

    173184401

    From 4342c510a7f4f0e4e908e4b9d50219c3137fc9bb Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:31:09 +0800 Subject: [PATCH 23/30] new_feedback --- app/views/layouts/_new_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index e3c0540fd..aa7540d61 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -25,7 +25,7 @@ <%#= l(:label_technical_support) %> -

    请加入师姐师姐答疑群

    173184401

    +

    请加入师姐师哥答疑群

    173184401

    From 4d1800e690868f0e320ebd5778356698c3ef652d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:31:27 +0800 Subject: [PATCH 24/30] new_feedback --- app/views/layouts/_new_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index aa7540d61..80a4c0fb2 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -25,7 +25,7 @@ <%#= l(:label_technical_support) %> -

    请加入师姐师哥答疑群

    173184401

    +

    请加入师哥师姐答疑群

    173184401

    From d4218fc81be07a60e17059e4f4a698459d1cbe34 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:33:42 +0800 Subject: [PATCH 25/30] new_feedback --- app/views/layouts/_new_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 80a4c0fb2..763b5a5d9 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -25,7 +25,7 @@ <%#= l(:label_technical_support) %> -

    请加入师哥师姐答疑群

    173184401

    +

    请加入师姐师兄答疑群

    173184401

    From 8ffbe8f30086ce4bdcf92ed2c1eee912225adc86 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 11:42:33 +0800 Subject: [PATCH 26/30] course manager can not apply to join that course --- app/services/courses_service.rb | 3 +++ app/views/courses/join.js.erb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 74580632f..c8af509f8 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -303,6 +303,7 @@ class CoursesService #@state == 7 您已经发送过申请了,请耐心等待 #@state == 8 您已经是该课程的教师了 #@state == 9 您已经是该课程的教辅了 + #@state == 10 您已经是该课程的管理员了 #@state 其他 未知错误,请稍后再试 def join_course params,current_user course = Course.find_by_id params[:object_id] @@ -325,6 +326,8 @@ class CoursesService #如果加入的角色教辅并且当前为教辅 elsif params[:role] == "7" && roleName == "TeachingAsistant" @state = 9 + elsif roleName == "Manager" + @state = 10 #如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求 elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" ) #如果已经发送过消息了,那么就要给个提示 diff --git a/app/views/courses/join.js.erb b/app/views/courses/join.js.erb index 2b4927f48..8102098d5 100644 --- a/app/views/courses/join.js.erb +++ b/app/views/courses/join.js.erb @@ -32,6 +32,10 @@ window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @co alert("您已经是该课程的教辅了"); hidden_join_course_form(); window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" +<% elsif @state == 10%> +alert("您已经是该课程的管理员了"); +hidden_join_course_form(); +window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" <% else %> alert("未知错误,请稍后再试"); <% end %> From f1092d5072951920686ed934a9c360eb19cc0fac Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 14:33:59 +0800 Subject: [PATCH 27/30] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E6=97=B6=E5=80=99=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=90=8E=E7=9A=84=20=E5=8F=AF=E9=80=89=E7=9A=84?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/attachments.js | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 685699064..813c10dee 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -552,27 +552,27 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) { fileSpan.append( $('', { 'type': 'text', - 'class': 'filename readonly', + 'class': 'upload_filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly' }).val(file.name), - $('', { - 'type': 'text', - 'class': 'description', - 'name': 'attachments[' + attachmentId + '][description]', - 'maxlength': 254, - 'placeholder': $(inputEl).data('descriptionPlaceholder') - }).toggle(!eagerUpload), - $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ - 'class': 'ispublic-label' - }), - $('', { - 'type': 'checkbox', - 'class': 'is_public_checkbox', - 'value': 1, - 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', - checked: 'checked' - }).toggle(!eagerUpload), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), +// $('' + $(inputEl).data('fieldIsPublic') + ':').attr({ +// 'class': 'ispublic-label' +// }), +// $('', { +// 'type': 'checkbox', +// 'class': 'is_public_checkbox', +// 'value': 1, +// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', +// checked: 'checked' +// }).toggle(!eagerUpload), $(' ').attr({ 'href': "#", 'class': 'remove-upload' From 8d25b5676c6d6eb899a8828848054824e382d1b9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 14:56:32 +0800 Subject: [PATCH 28/30] =?UTF-8?q?tag=5Fname=E5=90=8D=E7=A7=B0=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E6=89=A9=E5=A4=A7=E8=87=B3120=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/index.html.erb | 6 ++--- app/views/layouts/base_forums.html.erb | 4 +-- config/settings.yml | 2 +- public/stylesheets/application.css | 34 +++++++++++++++++++------- public/stylesheets/leftside.css | 2 +- public/stylesheets/pleft.css | 2 +- public/stylesheets/user_leftside.css | 2 +- 7 files changed, 34 insertions(+), 18 deletions(-) diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 782efbb22..3dad88868 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -247,7 +247,7 @@ tagId = id; taggableType = type; width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100 - domEle.html(''); + domEle.html(''); domEle.parent().css("border", "1px solid #ffffff"); $("#renameTagName").focus(); } @@ -295,8 +295,8 @@ // }else{ //否则就要更新tag名称了 //// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问 // $.post( -// '<%= update_tag_name_path %>', -// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>} +// '<%#= update_tag_name_path %>', +// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%#= @course.id%>} // ) //// }else{ //// ele.parent().css("border",""); diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index d32fbf4ed..e03ac2fc5 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -61,14 +61,14 @@ function addTag(){ if(<%=@forum.creator.id == User.current.id%>) { if ($("input[name='addTag']").val().trim() != "" ) { - if($("input[name='addTag']").val().trim().length <= 14) { + if($("input[name='addTag']").val().trim().length <= 120) { $.get( '<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(), {} ); $("input[name='addTag']").val(''); }else{ - alert("标签名字长度不能超过14个字符"); + alert("标签名字长度不能超过120个字符"); } } } diff --git a/config/settings.yml b/config/settings.yml index d0af6d7a1..4286e0930 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -259,7 +259,7 @@ tags_min_length: default: 1 tags_max_length: format: int - default: 14 + default: 120 tags_show_search_results: format: int default: 5 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index f8b5395d5..5646737f5 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2745,15 +2745,31 @@ h2 img { vertical-align:middle; } /*added by william*/ #tag { - background: url(../images/issue_tag.png) no-repeat right -19px; - border-radius: 3px; - color: #3a587d !important; - padding: 1px 4px 2px 4px; - margin: 3px; - display: inline-block; - font-size: 13px; /*modified by linchun*/ - text-decoration: none; - cursor: pointer; + /*background: url(../images/issue_tag.png) no-repeat right -19px;*/ + /*border-radius: 3px;*/ + /*color: #3a587d !important;*/ + /*padding: 1px 4px 2px 4px;*/ + /*margin: 3px;*/ + /*display: inline-block;*/ + /*font-size: 13px; *//*modified by linchun*/ + /*text-decoration: none;*/ + /*cursor: pointer;*/ + border-radius: 3px; + color: #3a587d !important; + padding: 1px 4px 2px 4px; + margin: 3px; + display: inline-block; + font-size: 13px; + text-decoration: none; + cursor: pointer; + width: auto; + padding: 0 5px; + padding-top: 2px; + border: 1px solid #f8df8c; + background: #fffce6; + margin-right: 5px; + word-wrap: break-word; + word-break: break-all; } /*tanxianbo*/ diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 990c02d54..26976343e 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;} diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index 1f48c9166..1ce12bdda 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -59,7 +59,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;} diff --git a/public/stylesheets/user_leftside.css b/public/stylesheets/user_leftside.css index e33e2c7d6..c8dfbe316 100644 --- a/public/stylesheets/user_leftside.css +++ b/public/stylesheets/user_leftside.css @@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} .submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag a{ color:#0d90c3;} .tag_h{ } .tag_h span,.tag_h a{ margin-bottom:5px;} From 42ae539ffa355402803402168c27c1f96efb4025 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 3 Nov 2015 15:51:11 +0800 Subject: [PATCH 29/30] =?UTF-8?q?=E7=AD=94=E7=96=91=E7=BE=A4=20=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_new_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 763b5a5d9..ffec82bce 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -25,7 +25,7 @@ <%#= l(:label_technical_support) %> -

    请加入师姐师兄答疑群

    173184401

    +

    请加入师姐师兄答疑群

    QQ群号:173184401

    From 6e7950983bc4a459758576e862d92486b0b8e065 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 3 Nov 2015 17:19:19 +0800 Subject: [PATCH 30/30] =?UTF-8?q?1=E3=80=81=E6=95=B0=E6=8D=AE=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=BF=81=E7=A7=BB=202=E3=80=81=E6=B7=BB=E5=8A=A0commi?= =?UTF-8?q?ts=E6=80=BB=E6=95=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 18 ++++++++++++------ app/views/repositories/changes.html.erb | 2 +- app/views/repositories/show.html.erb | 2 +- lib/tasks/update_rep_if_fault.rake | 20 ++++---------------- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index e25d01650..1f252cc24 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -224,10 +224,6 @@ update #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? - # g = Gitlab.client - # project = g.project(20) - # rr = g.trees(project.id, @path) - # r = g.get ("/projects/#{@project}/repository/tree") # :name, :path, :kind, :size, :lastrev, :changeset @entries = @repository.entries(@path, @rev) # @trees = g.trees(project, @path) @@ -241,10 +237,18 @@ update #Modified by young # (show_error_not_found; return) unless @entries g = Gitlab.client + count = 0 + (0..100).each do |page| + if g.commits(@project.gpid,:page => page).count == 0 + break + else + count = count + g.commits(@project.gpid,:page => page).count + end + end @changesets = g.commits(@project.gpid) # @changesets = @repository.latest_changesets(@path, @rev) # @changesets_count = @repository.latest_changesets(@path, @rev).count - @changesets_count = @changesets.count + @changesets_all_count = count @changesets_latest_coimmit = @changesets[0] @properties = @repository.properties(@path, @rev) @repositories = @project.repositories @@ -271,7 +275,9 @@ update @entry = @repository.entry(@path, @rev) (show_error_not_found; return) unless @entry g = Gitlab.client - @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}") + @commits = g.commits(@project.gpid, page:params[:pamge]) + @commit = g.commit(@project.gpid,@rev) + # @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}") #@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) @properties = @repository.properties(@path, @rev) @changeset = @repository.find_changeset_by_name(@rev) diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index f4037cb36..428799f07 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -14,7 +14,7 @@ <%= render_properties(@properties) %>
    - <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %> + <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @commits, :entry => @entry }) unless @commits.empty? %>
    <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 83f1a07ed..9601e5188 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -40,7 +40,7 @@ - <%=link_to @changesets_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %> 提交 + <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %> 提交 <% end %> diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake index 1c1f5a36e..3c7d119f2 100644 --- a/lib/tasks/update_rep_if_fault.rake +++ b/lib/tasks/update_rep_if_fault.rake @@ -1,23 +1,11 @@ #coding=utf-8 namespace :rep_fault do - desc "update fault rep" + desc "set ossean's type value" task :rep_update => :environment do - Project.all.each do |project| - if project.repositories.count > 0 - unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank? - project.repositories.each do |repository| - repository.is_default =1 - repository.save - end - end - end - end + rep = Repository.find(400) + rep.type = "Repository::Gitlab" + rep.save end - # desc "update ossean's data" - # task :update_type => :environment do - # repository = Repository.find(400) - # repository.update_attributes(:type => "Repository::Git") - # end end \ No newline at end of file