diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 25cc85ae2..334101bb0 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -777,8 +777,15 @@ class AdminController < ApplicationController #留言列表 def leave_messages + notes1, notes2, notes3 = '', '', '' + begin + notes1 = Message.find(19292).content + notes2 = Message.find(19291).content + notes3 = Message.find(19504).content + rescue => e + end @jour = JournalsForMessage.find_by_sql("SELECT * FROM journals_for_messages AS j1 - WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) order by created_on desc") + WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) AND j1.notes !='#{notes1}' AND j1.notes !='#{notes2}' AND j1.notes !='#{notes3}' order by created_on desc") @jour = paginateHelper @jour,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index b0c83e869..caf0b4bda 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -521,10 +521,10 @@ class IssuesController < ApplicationController def delete_journal @issue = Issue.find(params[:id]) begin - forge_acts = ForgeMessage.where(:forge_message_type => "Journal", :forge_message_id => params[:journal_id]).first - forge_acts.destroy unless forge_acts.nil? - at_message = AtMessage.where(:at_message_type => "Journal", :at_message_id => params[:journal_id]).first - at_message.destroy unless at_message.nil? + forge_acts = ForgeMessage.where(:forge_message_type => "Journal", :forge_message_id => params[:journal_id]) + forge_acts.destroy_all unless forge_acts.empty? + at_message = AtMessage.where(:at_message_type => "Journal", :at_message_id => params[:journal_id]) + at_message.destroy_all unless at_message.empty? Journal.delete(params[:journal_id]) rescue Exception => e puts e diff --git a/app/controllers/quality_analysis_controller.rb b/app/controllers/quality_analysis_controller.rb index 9fbe5bc3c..3a9eff0ce 100644 --- a/app/controllers/quality_analysis_controller.rb +++ b/app/controllers/quality_analysis_controller.rb @@ -243,15 +243,17 @@ class QualityAnalysisController < ApplicationController # 获取排名结果 @g = Gitlab.client - author_infos = @g.rep_user_stats(@project.gpid, :rev => @branch) + @author_infos = @g.rep_user_stats(@project.gpid, :rev => @branch) @user_quality_infos = [] - author_infos.each do |author_info| + @author_infos.each do |author_info| email = author_info.email changes = author_info.changes.to_i - user_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}&resolved=false").read - issue_count = JSON.parse(user_issues)["total"].to_i - ratio = (changes == 0 ? 0 : format("%0.4f",issue_count.to_f/changes.to_f)) - @user_quality_infos << {:email => email, :changes => changes, :issue_count => issue_count, :ratio => ratio} + unresolved_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}&resolved=false").read + unresolved_issue_count = JSON.parse(unresolved_issues)["total"].to_i + all_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}").read + all_issue_count = JSON.parse(all_issues)["total"].to_i + ratio = (changes == 0 ? 0 : format("%0.4f",unresolved_issue_count.to_f/changes.to_f)) + @user_quality_infos << {:email => email, :changes => changes, :unresolved_issue_count => unresolved_issue_count, :ratio => ratio, :all_issue_count => all_issue_count} end # 按名称转换成hash键值对 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2d6e84762..1ff7fc2d9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2524,7 +2524,7 @@ module ApplicationHelper def footer_logo(ul_class=nil, li_class=nil) logos = [] logos.push(link_to image_tag('/images/footer_logo/nudt.png',:alt=>"nudt"),"http://www.nudt.edu.cn/special.asp?classid=12" ) - logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://eecs.pku.edu.cn" ) + logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://www.sei.pku.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/buaa_scse.png', :alt=>"buaa_scse"), "http://scse.buaa.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/iscas.png', :alt=>"iscas"), "http://www.iscas.ac.cn" ) logos.push(link_to image_tag('/images/footer_logo/inforbus.png', :alt=>"inforbus"), "http://www.inforbus.com" ) diff --git a/app/helpers/org_member_helper.rb b/app/helpers/org_member_helper.rb index e16051eaf..8e7d1e2ef 100644 --- a/app/helpers/org_member_helper.rb +++ b/app/helpers/org_member_helper.rb @@ -7,7 +7,7 @@ module OrgMemberHelper scope = [] end principals = paginateHelper scope,10 - s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals') + s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals') links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options| link_to text, host_with_protocol + "/org_member/org_member_autocomplete?" + parameters.merge(:q => params[:q],:flag => true,:org=> org, :format => 'js').to_query, :remote => true } diff --git a/app/views/issues/_issue_reply_banner.html.erb b/app/views/issues/_issue_reply_banner.html.erb new file mode 100644 index 000000000..d68b2e38b --- /dev/null +++ b/app/views/issues/_issue_reply_banner.html.erb @@ -0,0 +1,5 @@ +<% count = @issue.journals.count %> +回复<%= count>0 ? "(#{count})" : "" %> + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%> + \ No newline at end of file diff --git a/app/views/issues/_jounal_refresh.js.erb b/app/views/issues/_jounal_refresh.js.erb index 0945ba04d..df3d605f4 100644 --- a/app/views/issues/_jounal_refresh.js.erb +++ b/app/views/issues/_jounal_refresh.js.erb @@ -17,5 +17,5 @@ issue_desc_editor = KindEditor.create('#issue_description', "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager"}); // $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); -$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)'); +$(".homepagePostReplyBannerCount").html('<%= escape_javascript(render :partial => 'issues/issue_reply_banner') %>'); sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%= @issue.class.name %>"); \ No newline at end of file diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 540e9d4ca..40728d451 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -36,12 +36,8 @@
- <% count = @issue.journals.count %> -
回复 - <%= count>0 ? "(#{count})" : "" %> - - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%> - +
+ <%=render :partial => 'issue_reply_banner' %>
diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 7253af03d..bef18d7fc 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -26,7 +26,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank" %> - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank" %> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank" %> <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank" %> diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index 7c5ab571e..18152c745 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -24,7 +24,7 @@ <%= l(:label_sponsor)%>
  • - <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%> + <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%>
  • <%= l(:label_co_organizer_BHU)%> diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 38b1c8a6f..c2fe181fe 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -2,7 +2,7 @@ <% teacher_num = TeacherAndAssistantCount(@course) %> <% student_num = studentCount(@course) %> <% course_file_num = visable_attachemnts_incourse(@course).count %> -

    +

    <%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cgrey') %>  >  <% if @course.syllabus %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index a639e1203..1625241fa 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>

  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_footer_show.html.erb b/app/views/layouts/_footer_show.html.erb index bb29956d3..19028ed8a 100644 --- a/app/views/layouts/_footer_show.html.erb +++ b/app/views/layouts/_footer_show.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>
  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_new_footer.html.erb b/app/views/layouts/_new_footer.html.erb index 06f8c61e3..90b693053 100644 --- a/app/views/layouts/_new_footer.html.erb +++ b/app/views/layouts/_new_footer.html.erb @@ -13,7 +13,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank"%>
  • - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank"%> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank"%>
  • <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank"%> diff --git a/app/views/organizations/_org_member_list.html.erb b/app/views/organizations/_org_member_list.html.erb index 8af7986fc..ea715d513 100644 --- a/app/views/organizations/_org_member_list.html.erb +++ b/app/views/organizations/_org_member_list.html.erb @@ -32,8 +32,8 @@ <% end %>
  • <% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%> - 编辑 - 删除 + 编辑 + 删除 <%#= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
    diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index 9fb0ac55b..9dbfbf8e4 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -108,7 +108,7 @@ <%= render :partial=>"org_member_list",:locals=> {:members=>@organization.org_members} %>
    -
    +

    添加成员

    <%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%> diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index 0ec0873ce..ff7863ce8 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -133,7 +133,8 @@
    •  
    • 代码行数
    • -
    • 引入质量问题数
    • +
    • 引入质量问题总数
    • +
    • 未解决质量问题数
    • 引入质量问题数/代码行数
    @@ -149,7 +150,8 @@
  • <%= author_info[:changes] %>
  • -
  • <%= author_info[:issue_count] %>
  • +
  • <%= author_info[:all_issue_count] %>
  • +
  • <%= author_info[:unresolved_issue_count] %>
  • <%= author_info[:ratio] %>
  • diff --git a/db/migrate/20160830090214_delete_null_at_messages.rb b/db/migrate/20160830090214_delete_null_at_messages.rb new file mode 100644 index 000000000..304a6bc4e --- /dev/null +++ b/db/migrate/20160830090214_delete_null_at_messages.rb @@ -0,0 +1,17 @@ +class DeleteNullAtMessages < ActiveRecord::Migration + def up + count = AtMessage.all.count / 30 + 2 + transaction do + for i in 1 ... count do i + AtMessage.page(i).per(30).each do |am| + if am.at_message.nil? + am.destroy + end + end + end + end + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 1e20df076..b5bd5f778 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160811084401) do +ActiveRecord::Schema.define(:version => 20160830090214) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -52,28 +52,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - create_table "application_settings", :force => true do |t| - t.integer "default_projects_limit" - t.boolean "signup_enabled" - t.boolean "signin_enabled" - t.boolean "gravatar_enabled" - t.text "sign_in_text" - t.datetime "created_at" - t.datetime "updated_at" - t.string "home_page_url" - t.integer "default_branch_protection", :default => 2 - t.boolean "twitter_sharing_enabled", :default => true - t.text "restricted_visibility_levels" - t.boolean "version_check_enabled", :default => true - t.integer "max_attachment_size", :default => 10, :null => false - t.integer "default_project_visibility" - t.integer "default_snippet_visibility" - t.text "restricted_signup_domains" - t.boolean "user_oauth_applications", :default => true - t.string "after_sign_out_path" - t.integer "session_expire_delay", :default => 10080, :null => false - end - create_table "applied_messages", :force => true do |t| t.integer "user_id" t.integer "applied_id" @@ -82,17 +60,16 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "status", :default => 0 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.string "name" t.integer "applied_user_id" t.integer "role" t.integer "project_id" - t.string "name" end create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "role", :default => 0 - t.integer "applied_user_id" + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "role", :default => 0 end create_table "apply_add_schools", :force => true do |t| @@ -207,20 +184,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.string "typeName", :limit => 50 end - create_table "audit_events", :force => true do |t| - t.integer "author_id", :null => false - t.string "type", :null => false - t.integer "entity_id", :null => false - t.string "entity_type", :null => false - t.text "details" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id" - add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type" - add_index "audit_events", ["type"], :name => "index_audit_events_on_type" - create_table "auth_sources", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false @@ -318,17 +281,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" add_index "boards", ["project_id"], :name => "boards_project_id" - create_table "broadcast_messages", :force => true do |t| - t.text "message", :null => false - t.datetime "starts_at" - t.datetime "ends_at" - t.integer "alert_type" - t.datetime "created_at" - t.datetime "updated_at" - t.string "color" - t.string "font" - end - create_table "bug_to_osps", :force => true do |t| t.integer "osp_id" t.integer "relative_memo_id" @@ -358,16 +310,14 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false + t.integer "repository_id", :null => false + t.string "revision", :null => false t.string "committer" - t.datetime "committed_on", :null => false + t.datetime "committed_on", :null => false t.text "comments" t.date "commit_date" t.string "scmid" t.integer "user_id" - t.integer "project_id" - t.integer "type", :default => 0 end add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" @@ -647,11 +597,8 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.string "qrcode" end - add_index "courses", ["id"], :name => "id", :unique => true add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true add_index "courses", ["syllabus_id"], :name => "index_courses_on_syllabus_id" - add_index "courses", ["tea_id"], :name => "tea_id" - add_index "courses", ["visits"], :name => "visits" create_table "custom_fields", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false @@ -714,15 +661,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - create_table "deploy_keys_projects", :force => true do |t| - t.integer "deploy_key_id", :null => false - t.integer "project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id" - create_table "discuss_demos", :force => true do |t| t.string "title" t.text "body" @@ -772,16 +710,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "created_at" end - create_table "emails", :force => true do |t| - t.integer "user_id", :null => false - t.string "email", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true - add_index "emails", ["user_id"], :name => "index_emails_on_user_id" - create_table "enabled_modules", :force => true do |t| t.integer "project_id" t.string "name", :null => false @@ -804,25 +732,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - create_table "events", :force => true do |t| - t.string "target_type" - t.integer "target_id" - t.string "title" - t.text "data" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "action" - t.integer "author_id" - end - - add_index "events", ["action"], :name => "index_events_on_action" - add_index "events", ["author_id"], :name => "index_events_on_author_id" - add_index "events", ["created_at"], :name => "index_events_on_created_at" - add_index "events", ["project_id"], :name => "index_events_on_project_id" - add_index "events", ["target_id"], :name => "index_events_on_target_id" - add_index "events", ["target_type"], :name => "index_events_on_target_type" - create_table "exercise_answers", :force => true do |t| t.integer "user_id" t.integer "exercise_question_id" @@ -925,15 +834,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type" add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at" - create_table "forked_project_links", :force => true do |t| - t.integer "forked_to_project_id", :null => false - t.integer "forked_from_project_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true - create_table "forums", :force => true do |t| t.string "name", :null => false t.text "description" @@ -1063,17 +963,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "identities", :force => true do |t| - t.string "extern_uid" - t.string "provider" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id" - add_index "identities", ["user_id"], :name => "index_identities_on_user_id" - create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1220,20 +1109,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "private", :default => 0 end - create_table "keys", :force => true do |t| - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" - t.text "key" - t.string "title" - t.string "type" - t.string "fingerprint" - t.boolean "public", :default => false, :null => false - end - - add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id" - add_index "keys", ["user_id"], :name => "index_keys_on_user_id" - create_table "kindeditor_assets", :force => true do |t| t.string "asset" t.integer "file_size" @@ -1245,27 +1120,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "owner_type", :default => 0 end - create_table "label_links", :force => true do |t| - t.integer "label_id" - t.integer "target_id" - t.string "target_type" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id" - add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type" - - create_table "labels", :force => true do |t| - t.string "title" - t.string "color" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "labels", ["project_id"], :name => "index_labels_on_project_id" - create_table "member_roles", :force => true do |t| t.integer "member_id", :null => false t.integer "role_id", :null => false @@ -1283,6 +1137,7 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.boolean "mail_notification", :default => false, :null => false t.integer "course_id", :default => -1 t.integer "course_group_id", :default => 0 + t.integer "is_collect", :default => 1 end add_index "members", ["project_id"], :name => "index_members_on_project_id" @@ -1317,47 +1172,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "viewed_count", :default => 0 end - create_table "merge_request_diffs", :force => true do |t| - t.string "state" - t.text "st_commits", :limit => 2147483647 - t.text "st_diffs", :limit => 2147483647 - t.integer "merge_request_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true - - create_table "merge_requests", :force => true do |t| - t.string "target_branch", :null => false - t.string "source_branch", :null => false - t.integer "source_project_id", :null => false - t.integer "author_id" - t.integer "assignee_id" - t.string "title" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "milestone_id" - t.string "state" - t.string "merge_status" - t.integer "target_project_id", :null => false - t.integer "iid" - t.text "description" - t.integer "position", :default => 0 - t.datetime "locked_at" - end - - add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id" - add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id" - add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id" - add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at" - add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id" - add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch" - add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id" - add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch" - add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true - add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title" - create_table "message_alls", :force => true do |t| t.integer "user_id" t.integer "message_id" @@ -1392,39 +1206,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" add_index "messages", ["parent_id"], :name => "messages_parent_id" - create_table "milestones", :force => true do |t| - t.string "title", :null => false - t.integer "project_id", :null => false - t.text "description" - t.date "due_date" - t.datetime "created_at" - t.datetime "updated_at" - t.string "state" - t.integer "iid" - end - - add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id" - add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date" - add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true - add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id" - - create_table "namespaces", :force => true do |t| - t.string "name", :null => false - t.string "path", :null => false - t.integer "owner_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "type" - t.string "description", :default => "", :null => false - t.string "avatar" - end - - add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id" - add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true - add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id" - add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true - add_index "namespaces", ["type"], :name => "index_namespaces_on_type" - create_table "news", :force => true do |t| t.integer "project_id" t.string "title", :limit => 60, :default => "", :null => false @@ -1450,31 +1231,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "notes", :force => true do |t| - t.text "note" - t.string "noteable_type" - t.integer "author_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "project_id" - t.string "attachment" - t.string "line_code" - t.string "commit_id" - t.integer "noteable_id" - t.boolean "system", :default => false, :null => false - t.text "st_diff", :limit => 2147483647 - end - - add_index "notes", ["author_id"], :name => "index_notes_on_author_id" - add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id" - add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id" - add_index "notes", ["created_at"], :name => "index_notes_on_created_at" - add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type" - add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type" - add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type" - add_index "notes", ["project_id"], :name => "index_notes_on_project_id" - add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at" - create_table "notificationcomments", :force => true do |t| t.string "notificationcommented_type" t.integer "notificationcommented_id" @@ -1484,49 +1240,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "oauth_access_grants", :force => true do |t| - t.integer "resource_owner_id", :null => false - t.integer "application_id", :null => false - t.string "token", :null => false - t.integer "expires_in", :null => false - t.text "redirect_uri", :null => false - t.datetime "created_at", :null => false - t.datetime "revoked_at" - t.string "scopes" - end - - add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true - - create_table "oauth_access_tokens", :force => true do |t| - t.integer "resource_owner_id" - t.integer "application_id" - t.string "token", :null => false - t.string "refresh_token" - t.integer "expires_in" - t.datetime "revoked_at" - t.datetime "created_at", :null => false - t.string "scopes" - end - - add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true - add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id" - add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true - - create_table "oauth_applications", :force => true do |t| - t.string "name", :null => false - t.string "uid", :null => false - t.string "secret", :null => false - t.text "redirect_uri", :null => false - t.string "scopes", :default => "", :null => false - t.datetime "created_at" - t.datetime "updated_at" - t.integer "owner_id" - t.string "owner_type" - end - - add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type" - add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true - create_table "onclick_times", :force => true do |t| t.integer "user_id" t.datetime "onclick_time" @@ -1684,23 +1397,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "allow_teacher", :default => 0 end - create_table "permissions", :force => true do |t| - t.string "controller", :limit => 30, :default => "", :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "description", :limit => 60, :default => "", :null => false - t.boolean "is_public", :default => false, :null => false - t.integer "sort", :default => 0, :null => false - t.boolean "mail_option", :default => false, :null => false - t.boolean "mail_enabled", :default => false, :null => false - end - - create_table "permissions_roles", :id => false, :force => true do |t| - t.integer "permission_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - end - - add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" - create_table "phone_app_versions", :force => true do |t| t.string "version" t.text "description" @@ -1783,11 +1479,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "project_import_data", :force => true do |t| - t.integer "project_id" - t.text "data" - end - create_table "project_infos", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1880,16 +1571,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - create_table "protected_branches", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :null => false - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "developers_can_push", :default => false, :null => false - end - - add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id" - create_table "pull_requests", :force => true do |t| t.integer "pull_request_id" t.integer "gpid" @@ -2046,25 +1727,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "is_teacher_score", :default => 0 end - create_table "services", :force => true do |t| - t.string "type" - t.string "title" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "active", :default => false, :null => false - t.text "properties" - t.boolean "template", :default => false - t.boolean "push_events", :default => true - t.boolean "issues_events", :default => true - t.boolean "merge_requests_events", :default => true - t.boolean "tag_push_events", :default => true - t.boolean "note_events", :default => true, :null => false - end - - add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id" - add_index "services", ["project_id"], :name => "index_services_on_project_id" - create_table "settings", :force => true do |t| t.string "name", :default => "", :null => false t.text "value" @@ -2103,26 +1765,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "snippets", :force => true do |t| - t.string "title" - t.text "content", :limit => 2147483647 - t.integer "author_id", :null => false - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "file_name" - t.datetime "expires_at" - t.string "type" - t.integer "visibility_level", :default => 0, :null => false - end - - add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id" - add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id" - add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at" - add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at" - add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id" - add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level" - create_table "softapplications", :force => true do |t| t.string "name" t.text "description" @@ -2203,9 +1845,9 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.integer "absence_penalty", :default => 0 t.float "system_score", :default => 0.0 t.boolean "is_test", :default => false - t.float "work_score" t.integer "simi_id" t.integer "simi_value" + t.float "work_score" t.integer "work_status", :default => 0 t.datetime "commit_time" end @@ -2255,13 +1897,13 @@ ActiveRecord::Schema.define(:version => 20160811084401) do create_table "sub_domains", :force => true do |t| t.integer "org_subfield_id" - t.integer "priority" + t.integer "priority", :default => 0 t.string "name" t.string "field_type" - t.integer "hide" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "hide", :default => 0 + t.integer "status", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "subfield_subdomain_dirs", :force => true do |t| @@ -2271,17 +1913,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "subscriptions", :force => true do |t| - t.integer "user_id" - t.integer "subscribable_id" - t.string "subscribable_type" - t.boolean "subscribed" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true - create_table "syllabuses", :force => true do |t| t.string "title" t.text "description" @@ -2543,17 +2174,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" add_index "users", ["type"], :name => "index_users_on_type" - create_table "users_star_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id" - add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true - add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id" - create_table "versions", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.string "name", :default => "", :null => false @@ -2605,23 +2225,6 @@ ActiveRecord::Schema.define(:version => 20160811084401) do t.datetime "updated_at", :null => false end - create_table "web_hooks", :force => true do |t| - t.string "url" - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "type", :default => "ProjectHook" - t.integer "service_id" - t.boolean "push_events", :default => true, :null => false - t.boolean "issues_events", :default => false, :null => false - t.boolean "merge_requests_events", :default => false, :null => false - t.boolean "tag_push_events", :default => false - t.boolean "note_events", :default => false, :null => false - end - - add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id" - add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id" - create_table "wechat_logs", :force => true do |t| t.string "openid", :null => false t.text "request_raw" diff --git a/public/images/footer_logo/CVICSE.png b/public/images/footer_logo/CVICSE.png index c252e0f93..6fa4566f7 100644 Binary files a/public/images/footer_logo/CVICSE.png and b/public/images/footer_logo/CVICSE.png differ diff --git a/public/images/footer_logo/ISCAS_logo.png b/public/images/footer_logo/ISCAS_logo.png index 7c2eb9ff7..f682f6ee0 100644 Binary files a/public/images/footer_logo/ISCAS_logo.png and b/public/images/footer_logo/ISCAS_logo.png differ diff --git a/public/stylesheets/css/org.css b/public/stylesheets/css/org.css index 3677c8bd8..3ce1eca33 100644 --- a/public/stylesheets/css/org.css +++ b/public/stylesheets/css/org.css @@ -17,14 +17,14 @@ .orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;} a.saveBtn {padding:2px 10px; background-color:#269ac9; color:#ffffff;} a.saveBtn:hover {background-color:#297fb8;} -.orgMemberList {width:420px; float:left;} +.orgMemberList {width:300px; float:left;} .orgColumnList {width:688px; float:left;} .orgListUser {width:110px; float:left;padding-right: 10px;} -.orgListRole {width:180px; float:left;} +.orgListRole {width:100px; float:left;} .orgOrder {width:70px; float:left; text-align:center;} .orgSubNum {width:30px; float:left; text-align:center;} .subNumBlock {cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; height:17px; line-height:17px; margin:7px 0; vertical-align:middle;} -.orgMemContainer {width:268px;} +.orgMemContainer {width:378px;} .orgMemberAdd {float:right;} .orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;} diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index ce2423c34..454fce294 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -498,9 +498,9 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .image-cir {border-radius:50%;} .analysis-genral-icon {position:absolute; padding:1px 5px; display:inline-block; top:5px;} .contribute-list-avatar {width:80px; vertical-align:middle; text-align:center;} -.contribute-list-code {width:160px; vertical-align:middle; text-align:center;} -.contribute-list-problem {width:170px; vertical-align:middle; text-align:center;} -.contribute-list-rate {width:228px; vertical-align:middle; text-align:center;} +.contribute-list-code {width:130px; vertical-align:middle; text-align:center;} +.contribute-list-problem {width:130px; vertical-align:middle; text-align:center;} +.contribute-list-rate {width:168px; vertical-align:middle; text-align:center;} .contribute-list-height {height:80px;} .contribute-list-line-height {line-height:80px;} @@ -554,4 +554,4 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .icons_project_favorite {background: url(/images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; float:left;} .icons_project_star{background: url(/images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; float:left;} .new_projectlist_more{ text-align:center;} -.new_projectlist_more a:hover{ color:#3b94d6;} +.new_projectlist_more a:hover{ color:#3b94d6;}