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] 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/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 8a1b3bbe0..1f252cc24 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -215,19 +215,15 @@ 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? - # 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 - @changesets = g.get ("/projects/#{@project.gpid}/repository/commits") + 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 @@ -252,11 +256,10 @@ 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 + @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' @@ -272,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/helpers/application_helper.rb b/app/helpers/application_helper.rb index 84364b4f6..b6c4ec91b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -609,6 +609,17 @@ 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 + + # 获取单一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/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 41f25d1a3..51d1846d8 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -117,6 +117,22 @@ module ProjectsHelper end 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+"/"+ rep_gitlab(project).first.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/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/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/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 %> 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..62d5c68e4 --- /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 25a03b347..8223f071e 100644 --- a/app/views/files/_upload_show_project.html.erb +++ b/app/views/files/_upload_show_project.html.erb @@ -1,16 +1,16 @@ -
+
-

<%= l(:label_upload_files)%>

+

<%= l(:label_upload_files)%>

<%= error_messages_for 'attachment' %> <%= 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/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/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 305187b02..ffec82bce 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

+

请加入师姐师兄答疑群

QQ群号:173184401

diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 98e8f378d..39de4faeb 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -138,7 +138,10 @@
123
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(); diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 1770291f5..e51683295 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -34,15 +34,23 @@ <%= 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 %> <%# --版本库被设置成私有、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 bfb87b16a..5196fd8e8 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -7,87 +7,88 @@ <%= 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) %> +
+ + + <% 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 %> +
  • +
  • + + + *<%=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)< + <% end %> +
  • +
    +
+ <%=l(:lable_project_rep_create) %> + <%=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" } %> +
历史版本库
- - - - - - - - - <% @project.repositories.sort.each do |repository| %> - - - - + <% 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 %>
+ <%= 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 %>
<% else %> -

<%= l(:label_repository_no_data) %>

+

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

<% end %> -<%# 新建版本库 %> -<% if @project.repositories.count == 0 %> - - - <% 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 %> 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 @@ + + + 历史版本 + + + + + + + + + <% 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/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/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/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/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 diff --git a/lib/tasks/update_rep_if_fault.rake b/lib/tasks/update_rep_if_fault.rake new file mode 100644 index 000000000..3c7d119f2 --- /dev/null +++ b/lib/tasks/update_rep_if_fault.rake @@ -0,0 +1,11 @@ +#coding=utf-8 + +namespace :rep_fault do + desc "set ossean's type value" + task :rep_update => :environment do + rep = Repository.find(400) + rep.type = "Repository::Gitlab" + rep.save + end + +end \ No newline at end of file diff --git a/public/images/sidebar_bg.png b/public/images/sidebar_bg.png index 9ceea0f91..e4d12da4d 100644 Binary files a/public/images/sidebar_bg.png and b/public/images/sidebar_bg.png differ diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 329d0db5a..813c10dee 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -37,27 +37,27 @@ function addFile_board(inputEl, file, eagerUpload, id) { 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', @@ -103,27 +103,27 @@ function addFile(inputEl, file, eagerUpload) { 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' @@ -532,17 +532,17 @@ 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), +// $('', { +// 'type': 'text', +// 'class': 'description', +// 'name': 'attachments[' + attachmentId + '][description]', +// 'maxlength': 254, +// 'placeholder': $(inputEl).data('descriptionPlaceholder') +// }).toggle(!eagerUpload), $('
', { 'class': 'div_attachments', 'name': 'div_' + 'attachments_' + attachmentId @@ -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' 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/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/courses.css b/public/stylesheets/courses.css index 8f27d7365..317a21d02 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -552,7 +552,7 @@ blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: bre #attachments_fields input.description {margin-left: 4px;width: 100px;} #attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;} -#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;} +#attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px; white-space: nowrap; } span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields span {display: block;white-space: nowrap;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} @@ -570,7 +570,7 @@ a.remove-upload:hover {text-decoration:none !important;} .attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;} -.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;} +.attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px;} span.add_attachment {font-size: 80%;line-height: 2.5em;} .attachments_fields span {display: block;white-space: nowrap;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} @@ -889,6 +889,7 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f .c_w{ color:#fff;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} .evaluation_submit{position: absolute;right: 0px;bottom: 0px;} .student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; } 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/new_user.css b/public/stylesheets/new_user.css index bca26d0c8..6a296b941 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;} @@ -1145,6 +1147,7 @@ img.ui-datepicker-trigger { text-overflow: ellipsis; margin-bottom: 3px; } +.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;} .message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);} 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/project.css b/public/stylesheets/project.css index e769e14e4..4594d0c51 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -369,7 +369,7 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} .reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} .reply_btn:hover{ background:#999; color:#fff; } - +.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .attachments_fields input.description {margin-left:4px; width:100px; } .attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';} .attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } @@ -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 0be7a6ff0..49b2906aa 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;} @@ -116,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;} @@ -133,6 +135,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..e2d636e2e 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{ + font-weight: bold; + font-size: 13px; + color: #7F7F7F; + padding-bottom: 10px; +} +.rep_history_grey{ + color: #7F7F7F; } \ No newline at end of file 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;}