From 9d783a7caa0a84681190c5163908da9228b946e7 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Tue, 3 Jun 2014 21:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E7=AD=89tab-menu=E7=9A=84=E6=98=BE=E7=A4=BA=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contestnotifications_controller.rb | 102 ++++--- app/views/contestnotifications/_form.html.erb | 55 ---- app/views/contestnotifications/index.html.erb | 4 - app/views/contestnotifications/new.html.erb | 18 +- app/views/layouts/base_newcontest.html.erb | 41 +-- config/routes.rb | 9 +- db/schema.rb | 271 +++++++++++++----- public/stylesheets/application.css | 4 + 8 files changed, 282 insertions(+), 222 deletions(-) diff --git a/app/controllers/contestnotifications_controller.rb b/app/controllers/contestnotifications_controller.rb index 675efd7f..f2c0fb80 100644 --- a/app/controllers/contestnotifications_controller.rb +++ b/app/controllers/contestnotifications_controller.rb @@ -4,31 +4,41 @@ class ContestnotificationsController < ApplicationController layout 'base_newcontest' default_search_scope :contestnotifications # model_object Contestnotifications - before_filter :find_model_object_contest, :except => [:new, :create, :index] - before_filter :find_contest_from_association, :except => [:new, :create, :index] - before_filter :find_contest_by_contest_id, :only => [:new, :create] - before_filter :authorize, :except => [:index] + # before_filter :find_model_object_contest, :except => [:new, :create, :index] + # before_filter :find_contest_from_association, :except => [:new, :create, :index] + # before_filter :find_contest_by_contest_id, :only => [:new, :create] + before_filter :find_contest + before_filter :find_author + # before_filter :authorize, :except => [:index] before_filter :find_optional_contest, :only => [:index] accept_rss_auth :index - accept_api_auth :index - + accept_api_auth :index - - def index + def find_author @user = @contest.author + render_404 if @user.nil? + end + def find_contest + @contest = Contest.find(params[:contest_id]) + render_404 if @contest.nil? + end + + + def index + # @contestnotifications = Contestnotification.all -# + # # respond_to do |format| - # format.html # index.html.erb - # format.json { render json: @contestnotifications } + # format.html # index.html.erb + # format.json { render json: @contestnotifications } # end - + ### begin ### case params[:format] - when 'xml', 'json' - @offset, @limit = api_offset_and_limit - else - @limit = 10 + when 'xml', 'json' + @offset, @limit = api_offset_and_limit + else + @limit = 10 end scope = @contest ? @contest.contestnotifications.visible : Contestnotification.visible @@ -39,8 +49,8 @@ class ContestnotificationsController < ApplicationController @contestnotificationss = scope.all(:include => [:author, :contest], :order => "#{Contestnotification.table_name}.created_at DESC", :offset => @offset, - :limit => @limit) - + :limit => @limit) + respond_to do |format| format.html { @contestnotification = Contestnotification.new # for adding news inline @@ -49,20 +59,20 @@ class ContestnotificationsController < ApplicationController format.api format.atom { render_feed(@contestnotificationss, :title => (@contest ? @contest.name : Setting.app_title) + ": #{l(:label_contest_notification)}") } end - ### end ### + ### end ### end # GET /contestnotifications/1 # GET /contestnotifications/1.json def show # @contestnotification = Contestnotification.find(params[:id]) -# + # # respond_to do |format| - # format.html # show.html.erb - # format.json { render json: @contestnotification } + # format.html # show.html.erb + # format.json { render json: @contestnotification } # end @comments = @contestnotifications.comments - @comments.reverse! if User.current.wants_comments_in_reverse_order? + @comments.reverse! if User.current.wants_comments_in_reverse_order? render :layout => 'base_newcontest' end @@ -89,17 +99,17 @@ class ContestnotificationsController < ApplicationController # POST /contestnotifications.json def create # @contestnotification = Contestnotification.new(params[:contestnotification]) -# + # # respond_to do |format| - # if @contestnotification.save - # format.html { redirect_to @contestnotification, notice: 'Contestnotification was successfully created.' } - # format.json { render json: @contestnotification, status: :created, location: @contestnotification } - # else - # format.html { render action: "new" } - # format.json { render json: @contestnotification.errors, status: :unprocessable_entity } - # end + # if @contestnotification.save + # format.html { redirect_to @contestnotification, notice: 'Contestnotification was successfully created.' } + # format.json { render json: @contestnotification, status: :created, location: @contestnotification } + # else + # format.html { render action: "new" } + # format.json { render json: @contestnotification.errors, status: :unprocessable_entity } # end - @contestnotifications = Contestnotifications.new(:contest => @contest, :author => User.current) + # end + @contestnotifications = Contestnotifications.new(:contest => @contest, :author => User.current) @contestnotifications.safe_attributes = params[:contestnotifications] @news.save_attachments(params[:attachments]) if @contestnotifications.save @@ -107,7 +117,7 @@ class ContestnotificationsController < ApplicationController flash[:notice] = l(:notice_successful_create) redirect_to project_news_index_path(@contest) else - layout_file = 'base_contest' + layout_file = 'base_contest' render :action => 'new', :layout => layout_file end end @@ -116,15 +126,15 @@ class ContestnotificationsController < ApplicationController # PUT /contestnotifications/1.json def update # @contestnotification = Contestnotification.find(params[:id]) -# + # # respond_to do |format| - # if @contestnotification.update_attributes(params[:contestnotification]) - # format.html { redirect_to @contestnotification, notice: 'Contestnotification was successfully updated.' } - # format.json { head :no_content } - # else - # format.html { render action: "edit" } - # format.json { render json: @contestnotification.errors, status: :unprocessable_entity } - # end + # if @contestnotification.update_attributes(params[:contestnotification]) + # format.html { redirect_to @contestnotification, notice: 'Contestnotification was successfully updated.' } + # format.json { head :no_content } + # else + # format.html { render action: "edit" } + # format.json { render json: @contestnotification.errors, status: :unprocessable_entity } + # end # end @contestnotifications.safe_attributes = params[:contestnotifications] @contestnotifications.save_attachments(params[:attachments]) @@ -142,10 +152,10 @@ class ContestnotificationsController < ApplicationController def destroy # @contestnotification = Contestnotification.find(params[:id]) # @contestnotification.destroy -# + # # respond_to do |format| - # format.html { redirect_to contestnotifications_url } - # format.json { head :no_content } + # format.html { redirect_to contestnotifications_url } + # format.json { head :no_content } # end @contestnotifications.destroy redirect_to contest_contestnotification_index_path(@contest) @@ -156,9 +166,9 @@ class ContestnotificationsController < ApplicationController def find_optional_contest return true unless params[:id] @contest = Contest.find(params[:id]) - # authorize + # authorize rescue ActiveRecord::RecordNotFound render_404 end - + end diff --git a/app/views/contestnotifications/_form.html.erb b/app/views/contestnotifications/_form.html.erb index 6904714d..e69de29b 100644 --- a/app/views/contestnotifications/_form.html.erb +++ b/app/views/contestnotifications/_form.html.erb @@ -1,55 +0,0 @@ - - - -<%= error_messages_for @contestnotifications %> -
- <% str =l(:label_news_new) %> -
-
-

<%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>

- -

<%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %>

-

<%= render :partial => 'attachments/form', :locals => {:container => @contestnotifications} %>

-
- -<%= wikitoolbar_for 'news_description' %> diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index 73adc758..090b72a3 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -72,10 +72,6 @@ - <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:contest_id => @contest, :key => User.current.rss_key} %> - <% end %> - <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> <%= stylesheet_link_tag 'scm' %> diff --git a/app/views/contestnotifications/new.html.erb b/app/views/contestnotifications/new.html.erb index 8b84b968..2ad24001 100644 --- a/app/views/contestnotifications/new.html.erb +++ b/app/views/contestnotifications/new.html.erb @@ -1,16 +1,6 @@ - - - - - -<%= labelled_form_for @contestnotifications, :url => contest_contestnotifications_path(@contest), - :html => { :id => 'news-form', :multipart => true } do |f| %> - <%= render :partial => 'contestnotifications/form', :locals => { :f => f } %> - <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %> - <%#= preview_link preview_contestnotifications_path(:contest_id => @contest), 'news-form' ,target='preview',{:class => 'whiteButton m3p10'}%> -<% end %> +<%#= labelled_form_for @contestnotifications, :url => contest_contestnotifications_path(@contest), :html => { :id => 'news-form', :multipart => true } do |f| %> + <%#= render :partial => 'contestnotifications/form', :locals => { :f => f } %> + <%#= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %> +<%# end %>
diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index e621f2f8..0ac19734 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -43,7 +43,7 @@ <%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %> <%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> > - <%= link_to @contest.name, show_contest_contest_path %> + <%= link_to @contest.name, show_contest_contest_path(@contest) %> @@ -95,21 +95,17 @@
- - + @@ -127,7 +123,7 @@
- - <%=link_to "#{@contest.watcher_users.count}", :controller => 'contests', :action => 'show_project' %> + <%=link_to "#{@contest.watcher_users.count}",show_project_contest_path(@contest) %> <% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %> <%=link_to "#{@contest.projects.where('is_public=1').count}" %> <% else %> - <%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_attendingcontest' %> + <%=link_to "#{@contest.contesting_softapplications.count}",show_attendingcontest_contest_path(@contest) %> <% end %>
- + @@ -210,25 +206,7 @@
- - +
@@ -236,7 +214,12 @@
<% if display_main_menu?(@contest) %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index dcf5609b..1c707bdb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,8 +18,8 @@ RedmineApp::Application.routes.draw do - match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => 'index' - + #match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => 'index' + resources :homework_users resources :no_uses @@ -72,6 +72,7 @@ RedmineApp::Application.routes.draw do ## new added by linchun #新竞赛相关 resources :contests, only: [:index] do + resources :contestnotifications#, except: [:index] collection do match 'new_contest' , via: :get match 'join_in_contest' , via: :post @@ -80,11 +81,11 @@ RedmineApp::Application.routes.draw do match 'new_join' , via: :post match 'new' , via: :post end - resources :contestnotifications member do + delete 'destroy_contest' match 'add_softapplication' match 'update_contest' , via: [:put] - match 'show_contest' , via: :get + match 'show_contest' , via: [:get, :post] match 'show_project' , via: :get match 'show_softapplication' , via: :get match 'show_attendingcontest' , via: :get diff --git a/db/schema.rb b/db/schema.rb index 1123adad..0e8337b9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -23,16 +23,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - create_table "andoidcontests", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - create_table "apply_project_masters", :force => true do |t| t.integer "user_id" t.string "apply_type" @@ -55,18 +45,12 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.datetime "created_on" t.string "description" t.string "disk_directory" - t.integer "attachtype", :default => 1 end add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - create_table "auth_sources", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false @@ -87,6 +71,20 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + create_table "bak_mentioned", :primary_key => "Id", :force => true do |t| + t.string "this_real_name", :limit => 1000 + t.integer "is_mentioned_in" + t.string "context", :limit => 2000 + end + + add_index "bak_mentioned", ["this_real_name", "is_mentioned_in"], :name => "name_mention", :length => {"this_real_name"=>900, "is_mentioned_in"=>nil} + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name" + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name_2" + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name_3", :length => {"this_real_name"=>900} + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name_4" + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name_5" + add_index "bak_mentioned", ["this_real_name"], :name => "this_real_name_6" + create_table "biding_projects", :force => true do |t| t.integer "project_id" t.integer "bid_id" @@ -126,12 +124,9 @@ ActiveRecord::Schema.define(:version => 20140530010015) 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 "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + create_table "categories", :primary_key => "Id", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "proj_categories" end create_table "changes", :force => true do |t| @@ -309,6 +304,14 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" + create_table "eco_projects", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.integer "eco_proj_id" + t.datetime "date_collected" + end + + add_index "eco_projects", ["proj_id"], :name => "proj_id" + create_table "enabled_modules", :force => true do |t| t.integer "project_id" t.string "name", :null => false @@ -330,6 +333,137 @@ ActiveRecord::Schema.define(:version => 20140530010015) 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", :primary_key => "event_id", :force => true do |t| + t.string "job_name" + t.datetime "event_time" + t.string "event_type", :limit => 20 + end + + create_table "fm_article", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "article_title", :limit => 16777215 + t.text "article_link", :limit => 16777215 + t.text "article_time", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_article", ["proj_id"], :name => "proj_id" + + create_table "fm_bugtracker_link", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_bugtracker_link", ["proj_id"], :name => "proj_id" + + create_table "fm_datametric_link", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_datametric_link", ["proj_id"], :name => "proj_id" + + create_table "fm_dependency_link", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_dependency_link", ["proj_id"], :name => "proj_id" + + create_table "fm_download_link", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "download_link", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_download_link", ["proj_id"], :name => "proj_id" + + create_table "fm_heartbeat", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.float "popularity_score", :limit => 12 + t.float "vitality_score", :limit => 12 + t.integer "subscription" + t.integer "voting_score" + t.integer "voting_count" + t.datetime "date_collected" + end + + add_index "fm_heartbeat", ["proj_id"], :name => "proj_id" + + create_table "fm_license", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_license", ["proj_id"], :name => "proj_id" + + create_table "fm_mailinglist_link", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_mailinglist_link", ["proj_id"], :name => "proj_id" + + create_table "fm_operating_system", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_operating_system", ["proj_id"], :name => "proj_id" + + create_table "fm_programming_language", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_programming_language", ["proj_id"], :name => "proj_id" + + create_table "fm_project_spotlight", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.text "project_name", :limit => 16777215 + t.text "project_spotlight_link", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_project_spotlight", ["proj_id"], :name => "proj_id" + + create_table "fm_release", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.text "release_version", :limit => 16777215 + t.text "release_time", :limit => 16777215 + t.text "release_tag", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_release", ["proj_id"], :name => "proj_id" + + create_table "fm_submit", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "submitter", :limit => 16777215 + t.text "submitter_link", :limit => 16777215 + t.text "submit_time", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_submit", ["proj_id"], :name => "proj_id" + + create_table "fm_summary", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.text "description", :limit => 16777215 + t.datetime "date_collected" + end + + add_index "fm_summary", ["proj_id"], :name => "proj_id" + create_table "forums", :force => true do |t| t.string "name", :null => false t.string "description", :default => "" @@ -351,12 +485,9 @@ ActiveRecord::Schema.define(:version => 20140530010015) do create_table "homework_attaches", :force => true do |t| t.integer "bid_id" t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "reward" - t.string "name" - t.string "description" - t.integer "state" end create_table "homework_for_courses", :force => true do |t| @@ -364,13 +495,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.integer "bid_id" end - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "issue_categories", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.string "name", :limit => 30, :default => "", :null => false @@ -580,6 +704,14 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.datetime "updated_at", :null => false end + create_table "ohloh_tagged", :force => true do |t| + t.integer "proj_id", :default => 0, :null => false + t.string "description", :limit => 100, :null => false + t.datetime "date_collected" + end + + add_index "ohloh_tagged", ["proj_id"], :name => "proj_id" + create_table "open_id_authentication_associations", :force => true do |t| t.integer "issued" t.integer "lifetime" @@ -603,7 +735,7 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.integer "users_count", :default => 0 t.date "last_commit_time" t.string "url" - t.date "date_collected" + t.datetime "date_collected" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end @@ -644,14 +776,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "projects", :force => true do |t| t.string "name", :default => "", :null => false t.text "description" @@ -667,8 +791,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.boolean "inherit_members", :default => false, :null => false t.integer "project_type" t.boolean "hidden_repo", :default => false, :null => false - t.integer "user_id" - t.integer "attachmenttype", :default => 1 end add_index "projects", ["lft"], :name => "index_projects_on_lft" @@ -697,13 +819,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "queries", ["project_id"], :name => "index_queries_on_project_id" add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "relative_memos", :force => true do |t| t.integer "osp_id", :null => false t.integer "parent_id" @@ -720,10 +835,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.integer "viewed_count_crawl", :default => 0 t.integer "viewed_count_local", :default => 0 t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" end create_table "repositories", :force => true do |t| @@ -756,7 +867,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.string "province" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "logo_link" end create_table "seems_rateable_cached_ratings", :force => true do |t| @@ -812,9 +922,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.integer "softapplication_id" t.integer "is_public" t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" end create_table "students_for_courses", :force => true do |t| @@ -824,6 +931,14 @@ ActiveRecord::Schema.define(:version => 20140530010015) do t.datetime "updated_at", :null => false end + create_table "t_project_to_os_projects", :force => true do |t| + t.integer "crawl_proj_id" + t.string "crawl_proj_web" + t.integer "trustie_osp_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "taggings", :force => true do |t| t.integer "tag_id" t.integer "taggable_id" @@ -882,6 +997,22 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" add_index "tokens", ["value"], :name => "tokens_value", :unique => true + create_table "tprojects", :force => true do |t| + t.string "name", :limit => 1000, :default => "0" + t.text "description", :limit => 16777215 + t.string "commit_count", :limit => 100, :default => "0" + t.string "code_line", :limit => 100 + t.string "last_commit_time", :limit => 100 + t.string "url", :limit => 1000 + t.datetime "date_collected" + t.string "created_at", :limit => 100 + t.string "updated_at", :limit => 100 + t.integer "proj_id", :null => false + t.string "user_count", :limit => 100 + end + + add_index "tprojects", ["proj_id"], :name => "proj_id" + create_table "trackers", :force => true do |t| t.string "name", :limit => 30, :default => "", :null => false t.boolean "is_in_chlog", :default => false, :null => false @@ -922,11 +1053,6 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - create_table "user_preferences", :force => true do |t| t.integer "user_id", :default => 0, :null => false t.text "others" @@ -937,11 +1063,16 @@ ActiveRecord::Schema.define(:version => 20140530010015) do add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" create_table "user_scores", :force => true do |t| - t.integer "user_id" - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "activity" + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "level" + t.integer "file" + t.integer "issue" end create_table "user_statuses", :force => true do |t| diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 977aef8f..ba077555 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2072,6 +2072,7 @@ button.tab-left, button.tab-right { padding:4px; width: 20px; bottom: -1px; + } button.tab-left { @@ -2115,6 +2116,9 @@ button.tab-right { font-weight:bold; border-top-left-radius:4px; border-top-right-radius:4px; + /*new added*/ + margin-top: 16px; + /*end*/ } #content .tabs_new ul li a:hover {
<%= l(:lable_contest_user) %><%= link_to(@user.show_name, user_path(@user))%><%= l(:lable_contest_user) %><%= link_to(@user.name, user_path(@user))%>
<%= l(:label_bids_reward_method) %><%= @contest.budget%>