diff --git a/.gitignore b/.gitignore index 44247461..52cf5141 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ log /log/development.scm.stderr.log test/* tmp/* +/app/models/tag.rb +/app/models/tag.rb diff --git a/Client.html b/Client.html new file mode 100644 index 00000000..5ba9775f --- /dev/null +++ b/Client.html @@ -0,0 +1,25 @@ + + + + +Client + + + + +
+

这是一张图片

+

photo Share A

+
+ +

这是一段视频

+

Text Share B

+
+ +

这是一篇文章

+

Text Share C

+
+ + + + \ No newline at end of file diff --git a/app/assets/javascripts/shares.js b/app/assets/javascripts/shares.js new file mode 100644 index 00000000..dee720fa --- /dev/null +++ b/app/assets/javascripts/shares.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/scaffold.css b/app/assets/stylesheets/scaffold.css new file mode 100644 index 00000000..1ae70002 --- /dev/null +++ b/app/assets/stylesheets/scaffold.css @@ -0,0 +1,56 @@ +body { background-color: #fff; color: #333; } + +body, p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; +} + +a { color: #000; } +a:visited { color: #666; } +a:hover { color: #fff; background-color:#000; } + +div.field, div.actions { + margin-bottom: 10px; +} + +#notice { + color: green; +} + +.field_with_errors { + padding: 2px; + background-color: red; + display: table; +} + +#error_explanation { + width: 450px; + border: 2px solid red; + padding: 7px; + padding-bottom: 0; + margin-bottom: 20px; + background-color: #f0f0f0; +} + +#error_explanation h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + margin-bottom: 0px; + background-color: #c00; + color: #fff; +} + +#error_explanation ul li { + font-size: 12px; + list-style: square; +} diff --git a/app/assets/stylesheets/shares.css b/app/assets/stylesheets/shares.css new file mode 100644 index 00000000..afad32db --- /dev/null +++ b/app/assets/stylesheets/shares.css @@ -0,0 +1,4 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index e785ff38..749d40a7 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -3,6 +3,7 @@ class BidsController < ApplicationController before_filter :find_bid, :only => [:show, :show_project, :create, :destroy, :more, :back, :add] helper :watchers + def index if params[:bid_title] Bid.creat_bids(params[:bid_budget], params[:bid_deadline], params[:bid_title] , params[:bid_description]) @@ -32,6 +33,13 @@ class BidsController < ApplicationController end def show_project + @membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current)) + @option = [] + @membership.each do |membership| + @option << membership.project + end + # a = [1] + # @project = Project.where("id in []", a) @user = @bid.author @bidding_project = @bid.biding_projects respond_to do |format| @@ -43,9 +51,9 @@ class BidsController < ApplicationController end def add - project_id = params[:bid_for_save][:project_id] + project = Project.where('name = ?', params[:bid]).first bid_message = params[:bid_for_save][:bid_message] - BidingProject.cerate_bidding(@bid.id, project_id, bid_message) + BidingProject.cerate_bidding(@bid.id, project.id, bid_message) @bidding_project = @bid.biding_projects respond_to do |format| # format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}} @@ -56,7 +64,7 @@ class BidsController < ApplicationController def create if params[:user_message].size>0 - message = params[:user_message] + message = params[:user_message][:message] @bid.add_jour(User.current, message) # if a_message.size > 5 # @message = a_message[-5, 5] diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb new file mode 100644 index 00000000..9a76d26b --- /dev/null +++ b/app/controllers/shares_controller.rb @@ -0,0 +1,92 @@ +class SharesController < ApplicationController + # GET /shares + # GET /shares.json + def index + @shares = Share.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @shares } + end + end + + # GET /shares/1 + # GET /shares/1.json + def show + @share = Share.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @share } + end + end + + # GET /shares/new + # GET /shares/new.json + def new + @share = Share.new + + #add by mkz 鎶撳彇鍙傛暟浼犵粰share + @share[:access_token] = params[:access_token] + @share[:comment] = params[:comment] + @share[:title] = params[:title] + @share[:url] = params[:url] + @share[:share_type] = params[:share_type] + @share.save + # + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @share } + end + end + + # GET /shares/1/edit + def edit + @share = Share.find(params[:id]) + end + + # POST /shares + # POST /shares.json + def create + @share = Share.new(params[:share]) + + respond_to do |format| + if @share.save + format.html { redirect_to @share, notice: 'Share was successfully created.' } + format.json { render json: @share, status: :created, location: @share } + else + format.html { render action: "new" } + format.json { render json: @share.errors, status: :unprocessable_entity } + end + end + end + + # PUT /shares/1 + # PUT /shares/1.json + def update + @share = Share.find(params[:id]) + + respond_to do |format| + if @share.update_attributes(params[:share]) + format.html { redirect_to @share, notice: 'Share was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @share.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /shares/1 + # DELETE /shares/1.json + def destroy + @share = Share.find(params[:id]) + @share.destroy + + respond_to do |format| + format.html { redirect_to shares_url } + format.json { head :no_content } + end + end +end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 229fc67a..34662d42 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -31,6 +31,8 @@ class TagsController < ApplicationController @obj = Project.find_by_id(@obj_id) when '3' then @obj = Issue.find_by_id(@obj_id) + when '4' then + @obj = Bid.find_by_id(@obj_id) else @obj = nil end diff --git a/app/helpers/shares_helper.rb b/app/helpers/shares_helper.rb new file mode 100644 index 00000000..e51aa8b8 --- /dev/null +++ b/app/helpers/shares_helper.rb @@ -0,0 +1,2 @@ +module SharesHelper +end diff --git a/app/models/share.rb b/app/models/share.rb new file mode 100644 index 00000000..f597ae79 --- /dev/null +++ b/app/models/share.rb @@ -0,0 +1,3 @@ +class Share < ActiveRecord::Base + attr_accessible :access_token, :comment, :share_type, :title, :url +end diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb index 4135208a..ca0d8764 100644 --- a/app/views/bids/_history.html.erb +++ b/app/views/bids/_history.html.erb @@ -1,6 +1,8 @@ - -<% if journals.size > 5 %> + + + +
<%=l(:label_user_response)%>(<%= journals.count%>)<% if journals.size > 5 %> <% unless state%>
<%= link_to l(:button_more), @@ -16,22 +18,35 @@ :method => 'get' %>
<% end %> -<% end %> - -

<%=l(:label_user_response)%>(<%= journals.count%>)

+<% end %>
+
<% unless state%> <% if journals.size > 5 %> <% journals = journals[0, 5] %> <% end %> <% end %> -<% for journal in journals %> -
-
-

<%= link_to "##{journal.indice}", {}, :class => "journal-link" %> - <%= avatar(journal.user, :size => "24") %> - <%= l(:label_updated_time_by, :author => journal.user, :age => time_tag(journal.created_at)).html_safe%>

- <%= render_notes(bid, journal, :reply_links => true) unless journal.notes.blank? %> -
-
- <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> + +<% if journals.size >0 %> +<% remove_allowed = (User.current.id == journals.first.jour_id) %> +<% for journal in journals%> + + + + + +
<%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %> + + + + + + + + + + +
<%=link_to journal.user, user_path(journal.user)%> 瀵归渶姹傝繘琛屼簡鍙嶉<%= link_to "##{journal.indice}", {}, :class => "journal-link" %>

<%= textilizable journal.notes%>

<%= journal.created_at %><%= link_to(image_tag('comment.png'), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true, + :method => 'post', :title => l(:button_quote))%><%= link_to(image_tag('delete.png'), {:controller => 'bids', :action => 'destroy', :object_id => journal, :bid_id => bid}, + :remote => true, :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.user_id == User.current.id %>
+<% end %> <% end %> diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index 1e395814..c6ab08a4 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -1,13 +1,14 @@ -<%= form_tag({:controller => 'bids', + +<%= form_for('user_message', :remote => true, :method => :post, + :url => {:controller => 'bids', :action => 'create', :bid_id => bid, - :sta => sta}, - :remote => true, - :method => :post) do %> - -

<%= label_tag 'user_message', l(:label_leave_message) %><%= text_area_tag 'user_message', nil %>

-

- <%= submit_tag l(:button_leave_meassge), :name => nil %> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message');", :type => 'button' %> -

+ :sta => sta}) do |f|%> + + + + + +
<%= f.text_area 'message', :rows => 4, :cols => 65, :value => "鎴戣鍙嶉", :required => true, :style => "resize: none;" %>
<%= submit_tag l(:button_leave_meassge), :name => nil %> + <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message_message');", :type => 'button' %>
<% end %> diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb index 53eda2b0..5f569c72 100644 --- a/app/views/bids/_project_list.html.erb +++ b/app/views/bids/_project_list.html.erb @@ -1,21 +1,28 @@ <% @bidding_project.each do |b_project|%> -
  • - - - + +
    - - - - -
    - - - - - - - -
    <%= link_to(b_project.project.name, project_path(b_project.project)) %>
    <%= b_project.project.description %>
    + + + - - - - -
    + + + + + - -
    +
    + <%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %> +
    + + + + + + + + + + + +
    <%= link_to(b_project.project.name, project_path(b_project.project)) %>鍙備笌浜嗗簲鏍
    <%= b_project.project.description %>
    <%= b_project.created_at%>
    +
    @@ -23,13 +30,10 @@ -
    搴旀爣浜猴細<%= link_to(b_project.user.name, user_path(b_project.user)) %>
    搴旀爣瀹h█锛<%= b_project.description %>
     
    - +
    +
    + + <% end %> diff --git a/app/views/bids/add.js.erb b/app/views/bids/add.js.erb index 9a6d1515..aaed6524 100644 --- a/app/views/bids/add.js.erb +++ b/app/views/bids/add.js.erb @@ -1,4 +1,4 @@ $('#bidding_project_list').html('<%= escape_javascript(render(:partial => 'project_list', :locals => {:bidding_project => @bidding_project})) %>'); $("#project_id").val("璇烽夋嫨椤圭洰"); -$("#project_id").val("璇疯緭鍏ュ簲鏍囩悊鐢"); +$("#bid_message").val("璇疯緭鍏ュ簲鏍囩悊鐢"); $("#put-bid-form").hide(); \ No newline at end of file diff --git a/app/views/bids/create.js.erb b/app/views/bids/create.js.erb index a524d9dd..15cf3f20 100644 --- a/app/views/bids/create.js.erb +++ b/app/views/bids/create.js.erb @@ -1,2 +1,2 @@ -$('#history').html('<%= escape_javascript(render(:partial => 'history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>'); -$('#user_message').val(""); +$('#history').html('<%= escape_javascript(render(:partial => 'bids/history', :locals => {:bid => @bid, :journals => @jour, :state => true})) %>'); +$('#user_message_message').val(""); diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb index 74c0531f..0cb206d0 100644 --- a/app/views/bids/index.html.erb +++ b/app/views/bids/index.html.erb @@ -1,37 +1,44 @@
    - <%= link_to("鏂板缓闇姹", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add') %> + <%= link_to("鏂板缓闇姹", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add', :style => "margin-right: 100px;") %>
    -

    闇姹傚垪琛

    + + +
    闇姹傚垪琛
    - \ No newline at end of file +<% end %> diff --git a/app/views/bids/new.js.erb b/app/views/bids/new.js.erb index d2cdeaae..2a4df8a6 100644 --- a/app/views/bids/new.js.erb +++ b/app/views/bids/new.js.erb @@ -1,2 +1,2 @@ -$('#user_message').val("<%= raw escape_javascript(@content) %>"); +$('#user_message_message').val("<%= raw escape_javascript(@content) %>"); showAndScrollTo("user_message", "user_message"); diff --git a/app/views/bids/show.html.erb b/app/views/bids/show.html.erb index a8271108..a5f259e7 100644 --- a/app/views/bids/show.html.erb +++ b/app/views/bids/show.html.erb @@ -1,11 +1,25 @@ -

    <%= link_to(@bid.author.name, user_path(@bid.author))%>锛<%= @bid.name %>

    - - - - - +

    闇姹傛弿杩

    <%= @bid.description %>
    + + + +
    <%= link_to image_tag(url_to_avatar(@bid.author), :class => "avatar"), user_path(@bid.author), :class => "avatar" %> + + + + + + +

    <%= link_to(@bid.author.name, user_path(@bid.author))%>锛<%= @bid.name %>

    鎮祻锛<%= @bid.budget %>
    +
    + + + + + +
    <%= @bid.description %>
    +
    <%= render :partial => 'history', :locals => { :bid => @bid, :journals => @jour, :state => false} %> diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb index c1af73b3..8a5d13f9 100644 --- a/app/views/bids/show_project.html.erb +++ b/app/views/bids/show_project.html.erb @@ -1,32 +1,29 @@ -
    -
    -
    -<%= toggle_link "鎴戣搴旀爣", 'put-bid-form', {:focus => 'project_id'} %> +
    +
    + <%= toggle_link "鎴戣搴旀爣", 'put-bid-form', {:focus => 'project_id'} %> +
    -

    搴旀爣椤圭洰鍒楄〃

    -
      -
      - <%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %> -
      -
    - + + +
    搴旀爣椤圭洰(<%= @bidding_project.count%>)
    +
    + <%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %> +
    diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index c7ce9a23..6e0609d6 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -29,8 +29,7 @@ <%= authoring @issue.created_on, @issue.author %>. <% if @issue.created_on != @issue.updated_on %> <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. - <% end %> - + <% end %>

    diff --git a/app/views/layouts/_tag.html.erb b/app/views/layouts/_tag.html.erb index 04c62fd1..65d6c55c 100644 --- a/app/views/layouts/_tag.html.erb +++ b/app/views/layouts/_tag.html.erb @@ -1,7 +1,26 @@ - - - +
    + + + + <% if object_flag == '3' %> + <%= toggle_link (image_tag "/images/add.png"), 'put-tag-form-issue', {:focus => 'name'} %> +
    + <%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> +
    + +
    +<% else %> <%= toggle_link (image_tag "/images/add.png"), 'put-tag-form', {:focus => 'name'} %>
    <%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> @@ -17,4 +36,5 @@ <%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%> <% end %>
    - +
    +<% end %> diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index f61d1d1c..e5aa2a08 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -56,19 +56,18 @@
    - 鍏虫敞 (<%= link_to @bid.watcher_users.count, home_path %>)  搴旀爣椤圭洰 (<%= link_to @bid.biding_projects.count, home_path %>)鍙嶉(<%= @bid.commit%>) + 鍏虫敞 (<%= link_to @bid.watcher_users.count, home_path %>)  搴旀爣椤圭洰 (<%= link_to @bid.biding_projects.count, project_for_bid_path(@bid) %>) 鍙嶉(<%= link_to @bid.commit, respond_path(@bid)%>)
    -
    - +
    +
    + 鏍囩 +
    +
    - - - - +
    鏍囩浜戯細
    -
    +
    <%= render :partial => 'layouts/tag', :locals => {:obj => @bid,:object_flag => "4"}%> -
    @@ -86,10 +85,7 @@ <%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar" %> <% end%> - - - <%= link_to "鏄剧ず鎵鏈夊叧娉",home_path %>(<%= link_to @bid.watcher_users.count, home_path %>) - +
    @@ -102,11 +98,11 @@
    - - - - - + +
    <%= link_to "鏄剧ず鎵鏈夊簲鏍囬」鐩",home_path %>(<%= link_to @bid.biding_projects.count, home_path %>)
    + <% for project in @bid.projects%> + <%= link_to image_tag(url_to_avatar(project), :class => "avatar"), project_path(project), :class => "avatar" %> + <% end%>
    diff --git a/app/views/shares/_form.html.erb b/app/views/shares/_form.html.erb new file mode 100644 index 00000000..3cf30386 --- /dev/null +++ b/app/views/shares/_form.html.erb @@ -0,0 +1,37 @@ +<%= form_for(@share) do |f| %> + <% if @share.errors.any? %> +
    +

    <%= pluralize(@share.errors.count, "error") %> prohibited this share from being saved:

    + + +
    + <% end %> + +
    + <%= f.label :access_token %>
    + <%= f.text_field :access_token %> +
    +
    + <%= f.label :comment %>
    + <%= f.text_field :comment %> +
    +
    + <%= f.label :url %>
    + <%= f.text_field :url %> +
    +
    + <%= f.label :title %>
    + <%= f.text_field :title %> +
    +
    + <%= f.label :share_type %>
    + <%= f.number_field :share_type %> +
    +
    + <%= f.submit %> +
    +<% end %> diff --git a/app/views/shares/edit.html.erb b/app/views/shares/edit.html.erb new file mode 100644 index 00000000..b54061dd --- /dev/null +++ b/app/views/shares/edit.html.erb @@ -0,0 +1,6 @@ +

    Editing share

    + +<%= render 'form' %> + +<%= link_to 'Show', @share %> | +<%= link_to 'Back', shares_path %> diff --git a/app/views/shares/index.html.erb b/app/views/shares/index.html.erb new file mode 100644 index 00000000..fe06463b --- /dev/null +++ b/app/views/shares/index.html.erb @@ -0,0 +1,31 @@ +

    Listing shares

    + + + + + + + + + + + + + +<% @shares.each do |share| %> + + + + + + + + + + +<% end %> +
    Access tokenCommentUrlTitleShare type
    <%= share.access_token %><%= share.comment %><%= share.url %><%= share.title %><%= share.share_type %><%= link_to 'Show', share %><%= link_to 'Edit', edit_share_path(share) %><%= link_to 'Destroy', share, method: :delete, data: { confirm: 'Are you sure?' } %>
    + +
    + +<%= link_to 'New Share', new_share_path %> diff --git a/app/views/shares/new.html.erb b/app/views/shares/new.html.erb new file mode 100644 index 00000000..919a9f4b --- /dev/null +++ b/app/views/shares/new.html.erb @@ -0,0 +1,5 @@ +

    New share

    + +<%= render 'form' %> + +<%= link_to 'Back', shares_path %> diff --git a/app/views/shares/show.html.erb b/app/views/shares/show.html.erb new file mode 100644 index 00000000..7744914e --- /dev/null +++ b/app/views/shares/show.html.erb @@ -0,0 +1,30 @@ +

    <%= notice %>

    + +

    + Access token: + <%= @share.access_token %> +

    + +

    + Comment: + <%= @share.comment %> +

    + +

    + Url: + <%= @share.url %> +

    + +

    + Title: + <%= @share.title %> +

    + +

    + Share type: + <%= @share.share_type %> +

    + + +<%= link_to 'Edit', edit_share_path(@share) %> | +<%= link_to 'Back', shares_path %> diff --git a/app/views/tags/_tag_search_results.html.erb b/app/views/tags/_tag_search_results.html.erb index 7fba1397..1d7b6d9b 100644 --- a/app/views/tags/_tag_search_results.html.erb +++ b/app/views/tags/_tag_search_results.html.erb @@ -8,7 +8,6 @@
  • <% end %> <% end %> - <% if users_results.size > 0 %>

    Users:

    diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 7b489083..ea851333 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -1,4 +1,16 @@ -
    + + +
    -
    +

    Search Results

    <%= link_to "Issue",:action => "index"%>(<%= @issues_tags_num %>)| diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8cebff65..efbd435b 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -94,36 +94,6 @@  
    - - <% for user in @users -%>
    <%= content_tag "p", "#{date_format_local(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> @@ -142,12 +112,10 @@
    <% end -%>
    - - <% html_title(l(:label_user_plural)) -%> <% end -%> diff --git a/app/views/users/tag_save.js.erb b/app/views/users/tag_save.js.erb index da977c14..a5a07b0b 100644 --- a/app/views/users/tag_save.js.erb +++ b/app/views/users/tag_save.js.erb @@ -1,4 +1,14 @@ -$('#tags_show').html('<%= escape_javascript(render :partial => 'layouts/tag_name',:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); + + +<% if @obj_flag == '3'%> +$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'layouts/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#put-tag-form-issue').hide(); +$('#name-issue').val(""); +<% else %> +$('#tags_show').html('<%= escape_javascript(render :partial => 'layouts/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); $('#put-tag-form').hide(); $('#name').val(""); +<% end %> diff --git a/config/routes.rb b/config/routes.rb index 51daeb28..fd56217b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -16,6 +16,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. RedmineApp::Application.routes.draw do + resources :shares + + get "tags/index" get "tags/show" @@ -408,13 +411,13 @@ RedmineApp::Application.routes.draw do delete 'bids/destroy', :to => 'bids#destroy' get 'bids/more', :to => 'bids#more' get 'bids/back', :to=> 'bids#back' - match 'bids/:bid_id/show_project', :controller => 'bids', :action => 'show_project' + match 'bids/:bid_id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid' match 'bids/:bid_id/add', :controller => 'bids', :action => 'add' match 'bids/new_bid', :controller => 'bids', :action => 'new_bid' # added by young match 'bids', :controller => 'bids', :action => 'index' - match 'bids/:bid_id/show', :controller => 'bids', :action => 'show' + match 'bids/:bid_id/show', :controller => 'bids', :action => 'show', :as => 'respond' match 'bids/new', :controller => 'bids', :action => 'new', :via => [:get , :post] diff --git a/db/migrate/20130801081314_create_shares.rb b/db/migrate/20130801081314_create_shares.rb new file mode 100644 index 00000000..755de055 --- /dev/null +++ b/db/migrate/20130801081314_create_shares.rb @@ -0,0 +1,13 @@ +class CreateShares < ActiveRecord::Migration + def change + create_table :shares do |t| + t.string :access_token + t.string :comment + t.string :url + t.string :title + t.integer :share_type + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index a6de651e..4bae3d3b 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 => 20130729033444) do +ActiveRecord::Schema.define(:version => 20130801081314) do create_table "a_user_watchers", :force => true do |t| t.string "name" @@ -516,12 +516,13 @@ ActiveRecord::Schema.define(:version => 20130729033444) do add_index "settings", ["name"], :name => "index_settings_on_name" create_table "shares", :force => true do |t| - t.string "title" - t.string "type" + t.string "access_token" + t.string "comment" t.string "url" - t.date "created_on" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "students", :force => true do |t| diff --git a/public/images/avatars/Project/6314 b/public/images/avatars/Project/6314 index 6c099118..b58caabf 100644 Binary files a/public/images/avatars/Project/6314 and b/public/images/avatars/Project/6314 differ diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 2ea13a2d..1dc9744b 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1072,7 +1072,7 @@ div.wiki-description { float: left; margin-left: 20px; margin-top: 10px; - width: 427px; + width: 470px; max-height: 121px; font-family: helvetica,arial,sans-serif; color: rgb(0, 0, 0); @@ -1199,6 +1199,10 @@ a.img-tag3{ width: 908px; margin-bottom: 5px; } + +.add-info a { + margin-left: 60px; +} .main-language { float: left; height: 18px; @@ -1416,7 +1420,7 @@ div.autoscroll li{ list-style-type: none; } -div.autoscroll li.hascontextmenu{ +div.autoscroll li.hascontextmenu-1{ position: relative; display: block; margin-bottom: -1px; @@ -1426,6 +1430,9 @@ div.autoscroll li.hascontextmenu{ width: 600px;/*by young*/ } +.hascontextmenu-1 a { + cursor: pointer ; +} div.autoscroll li.id { position: relative; top: 2px; @@ -1464,7 +1471,9 @@ div.autoscroll li.tracker, div.autoscroll li.status, div.autoscroll li.priority{ font: 10px/1.4 Helvetica,arial,freesans,clean,sans-serif; } - +div.autoscroll ul.list-group-item-meta a { + color: rgb(51, 51, 51); +} li.issue img.img-tag-issues { float: left; height: 24px; @@ -1515,4 +1524,18 @@ div.member_content { margin-top: 20px; width: 600px; margin-left: 40px; +} +/*by fanqiang*/ +img.avatar3 { + width: 50px; + height: 50px; +} + +a.bid_path { + font-size: 14px; +} +a.bid_user { + font-family:寰蒋闆呴粦; + color:#acaeb1; + font-size:12px; } \ No newline at end of file