diff --git a/app/controllers/praise_tread_controller.rb b/app/controllers/praise_tread_controller.rb index 528011102..48574bcad 100644 --- a/app/controllers/praise_tread_controller.rb +++ b/app/controllers/praise_tread_controller.rb @@ -1,32 +1,17 @@ class PraiseTreadController < ApplicationController - + + accept_api_auth :tread_plus,:praise_plus + before_filter :require_login,:only => [:praise_plus,:tread_plus] + def praise_plus @obj = nil + # @is_in_list = nil if request.get? - @obj = params[:obj] # 传的是对象,最后变成id了 - - #首先创建或更新praise_tread 表 - @pt = PraiseTread.find_by_user_id_and_praise_tread_object_id(User.current.id,@obj) - @pt = @pt.nil? ? PraiseTread.new : @pt - - @pt.user_id = User.current.id - @pt.praise_tread_object_id = @obj.to_i - @pt.praise_tread_object_type = User.find_by_id(@obj).class.name.underscore - @pt.praise_or_tread = 1 - @pt.save - - #再创建或更新praise_tread_cache表 - @ptc = PraiseTreadCache.find_by_object_id(@obj) - @ptc = @ptc.nil? ? PraiseTreadCache.new : @ptc - @ptc.object_id = @obj.to_i - @ptc.object_type = User.find_by_id(@obj).class.name.underscore - @ptc.plus(1) - @ptc.save - end - @obj = User.find_by_id(@obj) - respond_to do |format| - format.html - format.js + @obj_id = params[:obj_id] + @obj_type = params[:obj_type] + @obj = find_object_by_type_and_id(@obj_type,@obj_id) + # @is_in_list = params[:is_in_list] + praise_tread_plus(@obj_type,@obj_id,1) end end @@ -55,7 +40,15 @@ class PraiseTreadController < ApplicationController end def tread_plus - + @obj = nil + # @is_in_list = nil + if request.get? + @obj_id = params[:obj_id] + @obj_type = params[:obj_type] + @obj = find_object_by_type_and_id(@obj_type,@obj_id) + # @is_in_list = params[:is_in_list] + praise_tread_plus(@obj_type,@obj_id,0) + end end def tread_minus @@ -65,4 +58,46 @@ class PraiseTreadController < ApplicationController end end + private + + def find_object_by_type_and_id(type,id) + @obj = nil + case type + when 'User' + @obj = User.find_by_id(id) + when 'Issue' + @obj = Issue.find_by_id(id) + when 'Project' + @obj = Project.find_by_id(id) + when 'Bid' + @obj = Bid.find_by_id(id) + end + return @obj + end + + def praise_tread_plus(type,id,flag) + unless id.nil? and type.nil? + #首先创建或更新praise_tread 表 + @pt = PraiseTread.new + @pt.user_id = User.current.id + @pt.praise_tread_object_id = id.to_i + @pt.praise_tread_object_type = type + @pt.praise_or_tread = flag + @pt.save + # end + + #再创建或更新praise_tread_cache表 + @ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type) + @ptc = @ptc.nil? ? PraiseTreadCache.new : @ptc + @ptc.object_id = id.to_i + @ptc.object_type = type + @ptc.save + @ptc.plus(flag,1) + end + respond_to do |format| + format.html + format.js + end + end + end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0e005690e..0a1775c5c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -28,10 +28,10 @@ class UsersController < ApplicationController before_filter :require_admin, :except => [:show, :index,:tag_save, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info, :user_watchlist, :user_fanslist,:edit] before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info] - accept_api_auth :index, :show, :create, :update, :destroy + accept_api_auth :index, :show, :create, :update, :destroy,:tag_save #william - before_filter :require_login,:only=>[:tag_save] + before_filter :need_login,:only => :tag_save helper :sort diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 789861fad..75484a227 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1317,8 +1317,8 @@ module ApplicationHelper # end #added by william - def get_fans_num(user) - user.watcher_users.count + def need_login + redirect_to signin_path end #end end diff --git a/app/helpers/praise_tread_helper.rb b/app/helpers/praise_tread_helper.rb index 9b2eba969..26e4e5f4c 100644 --- a/app/helpers/praise_tread_helper.rb +++ b/app/helpers/praise_tread_helper.rb @@ -1,22 +1,27 @@ module PraiseTreadHelper #added by william def is_praise_or_tread(object,user_id) - @obj_type = object.class.name.underscore + @obj_type = object.class @obj_id = object.id - @is_praise = PraiseTread.find_by_sql("select * from praise_treads where user_id=#{user_id} and " + - "praise_tread_object_type='#{@obj_type}' and praise_tread_object_id=#{@obj_id} ") + @is_praise = PraiseTread.find_by_sql("select praise_or_tread from praise_treads where user_id=#{user_id} and " + + "praise_tread_object_type='#{@obj_type}' and praise_tread_object_id=#{@obj_id}") return @is_praise end #end - def get_praise_num(object) - @obj_type = object.class.name.underscore + def get_praise_num(object,flag) + @obj_type = object.class @obj_id = object.id @record = PraiseTreadCache.find_by_object_id_and_object_type(@obj_id,@obj_type) if @record - return @record.praise_num - else - return 0 + case flag + when 1 + return @record.praise_num.nil? ? 0 : @record.praise_num + when 0 + return @record.tread_num.nil? ? 0 : @record.tread_num + end + else + return 0 end end diff --git a/app/models/praise_tread_cache.rb b/app/models/praise_tread_cache.rb index 330e197cf..739b45876 100644 --- a/app/models/praise_tread_cache.rb +++ b/app/models/praise_tread_cache.rb @@ -1,8 +1,13 @@ class PraiseTreadCache < ActiveRecord::Base attr_accessible :object_id,:object_type,:praise_num,:tread_num - def plus(num) - self.update_attribute(:praise_num, self.praise_num.to_i + num) + def plus(flag,num) + case flag + when 0 + self.update_attribute(:tread_num, self.tread_num.to_i + num) + when 1 + self.update_attribute(:praise_num, self.praise_num.to_i + num) + end end def minus(num) diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb index e17b0e2e6..c1a9c3257 100644 --- a/app/views/bids/_history.html.erb +++ b/app/views/bids/_history.html.erb @@ -48,7 +48,8 @@ <%= journal.created_on %> <%= 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, :id => bid}, + :method => 'post', :title => l(:button_quote))%> + <%= link_to(image_tag('delete.png'), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm), :remote => true, :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.user_id == User.current.id %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index e174b01bc..53a6681db 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -72,23 +72,27 @@
  • "> <% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> + + <%= render :partial => "/praise_tread/praise_tread", + :locals => {:obj => issue,:user_id =>User.current.id}%> + <% if issue.tracker.name == 'Bug' %> <%= image_tag("/images/task.png", :class => "img-tag-issues") %> <% end %> <% if issue.tracker.name == '任务'%> <%= image_tag("/images/issues.png", :class => "img-tag-issues") %> <% end %> +
  • diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 67035468a..2917bdf4a 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -20,12 +20,15 @@ <% end %> - -
    <%= render_issue_subject_with_tree(@issue) %> -
    + + + +<%= render :partial => "/praise_tread/praise_tread", + :locals => {:obj => @issue,:user_id =>User.current.id}%> +

    <%= authoring @issue.created_on, @issue.author %>. <% if @issue.created_on != @issue.updated_on %> @@ -36,7 +39,6 @@

    <%= render :partial => 'layouts/tag', :locals => {:obj => @issue,:object_flag => "3" }%>
    - <%= issue_fields_rows do |rows| rows.left l(:field_status), h(@issue.status.name), :class => 'status' diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index a64767f98..892be7e42 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -1,6 +1,6 @@
    -
    - <%=link_to image_tag("/images/logo.png",weight:"39px", height: "39px"), home_path %> +
    <%= render_menu :account_menu -%> diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 6c65e1507..1d668117a 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -44,15 +44,12 @@
    - - <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @user,:show_flag => false,:user_id =>User.current.id}%> -
    <%= l(:label_user_watcher) %> (<%=link_to User.watched_by(@user.id).count ,:controller=>"users", :action=>"user_watchlist"%>)   <%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(@user) }%> - +
    diff --git a/app/views/praise_tread/_praise_tread.html.erb b/app/views/praise_tread/_praise_tread.html.erb index c5a427a61..4ed2328cf 100644 --- a/app/views/praise_tread/_praise_tread.html.erb +++ b/app/views/praise_tread/_praise_tread.html.erb @@ -1,17 +1,57 @@ - - <% if is_praise_or_tread(obj,user_id).size > 0 %> - <%= image_tag("/images/praise.png") %> - <%= link_to "#{l(:label_cancel_praise)}",:controller=>"praise_tread",:action=>"praise_minus",:remote=>true,:obj => obj %> - (<%= get_praise_num(obj)%>) - <% else %> - <%= image_tag("/images/tread.png") %> - <%= link_to "#{l(:label_praise)}",:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj => obj %> - (<%= get_praise_num(obj)%>) - <% end %> - -<% if show_flag %> - - <%= link_to image_tag("/images/tread.png"),:controller=>"praise_tread", - :action=>"tread_minus",:remote=>true,:obj => obj %>踩 - -<% end %> + +
    + + <% @is_valuate = is_praise_or_tread(obj,user_id)%> + <% if @is_valuate.size > 0 %> + <% @flag = @is_valuate.first.praise_or_tread %> + <% if @flag == 1 %> + + + + + + + + + + + +
    <%= image_tag("/images/praise_tread/praise_true.png") %>
    +<%= get_praise_num(obj,1)%>
    <%= image_tag("/images/praise_tread/tread_false.png") %>
    + <% elsif @flag == 0 %> + + + + + + + + + + + +
    <%= image_tag("/images/praise_tread/praise_false.png") %>
    -<%= get_praise_num(obj,0)%>
    <%= image_tag("/images/praise_tread/tread_true.png") %>
    + <% end %> + + <% else %> + + + + + + + + + + + + + + + +
    <%= link_to image_tag("/images/praise_tread/praise_false.png"), + :controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class%>
    +<%= get_praise_num(obj,1)%>
    ---
    -<%= get_praise_num(obj,0)%>
    <%= link_to image_tag("/images/praise_tread/tread_false.png"),:controller=>"praise_tread", + :action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class %>
    + + <% end %> +
    + diff --git a/app/views/praise_tread/praise_plus.js.erb b/app/views/praise_tread/praise_plus.js.erb index 74f7d6bfe..c2584dcd2 100644 --- a/app/views/praise_tread/praise_plus.js.erb +++ b/app/views/praise_tread/praise_plus.js.erb @@ -1,3 +1,4 @@ -$('#praise_tread').html('<%= j( -render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:show_flag => false,:user_id => User.current.id} + +$('#praise_tread_<%= @obj.id %>').html('<%= j( +render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id} )%>'); diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 0bf0642dd..d82d3dc9d 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -87,8 +87,7 @@
    <% for user in @users -%> -
    - +
    <%= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %> <%= image_tag "/images/time_member.png", :class => "img_member_time"%> @@ -99,9 +98,8 @@
    <%= l(:label_has_fans,:count=>user.watcher_users.count)%> <%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %> - <%= l(:label_has_praisers,:count=>get_praise_num(user))%>
    - +
    <% unless user.memberships.empty? %> <%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index b1528602b..f61eb01f5 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,44 +1,44 @@ - - -
    -
    - - - -
    Trustie - 是一个社交化的项目管理、软件开发和众包平台。
    Trustieforge is a socialized collaboration platform for project management, - software development and software crowdsourcing.
    -
    +
    +
    + + + + + + + +
    Trustie是一个社交化的项目管理、软件开发和众包平台。
    Trustieforge is a socialized collaboration platform for project management, + software development and software crowdsourcing.
    +
    - -
    - <%= call_hook :view_account_login_top %> -
    - <%= form_tag(signin_path) do %> - <%= back_url_hidden_field_tag %> - <% unless User.current.logged? %> - - - - - - - - - - <% if Setting.openid? %> - - - - - <% end %> - - - - - - - -
    <%= text_field_tag 'username', params[:username], :tabindex => '1' %>
    <%= password_field_tag 'password', nil, :tabindex => '2' %>
    <%= text_field_tag "openid_url", nil, :tabindex => '3' %>
    - <% if Setting.autologin? %> - - <% end %> -
    - <% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), lost_password_path %> - <% end %> - - -
    - <% else %> -
    - - - - - - - -
    欢迎 <%=User.current.name%> 加入trustie!
    <%= image_tag(url_to_avatar(User.current), :class => 'avatar') %>
    <%= l(:label_user_watcher) %> (<%= User.watched_by(User.current).count %>) - <%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(User.current) }%>
    <% unless User.current.memberships.empty? %> - <%= l(:label_contribute_to, :project_count => "#{User.current.memberships.count}") %> - <% for member in User.current.memberships %> - <%= link_to_project(member.project) %><%= (User.current.memberships.last == member) ? '' : ',' %> - <% end %> - <% end %>
    -
    - <% end %> -<% end %> -
    -<%= call_hook :view_account_login_bottom %> - -<% if params[:username].present? %> -<%= javascript_tag "$('#password').focus();" %> -<% else %> -<%= javascript_tag "$('#username').focus();" %> -<% end %> - -
    - -
    - - - - - - - - + + +
    <%= link_to image_tag("/images/welcome/1.png", weight:"200px", height:"200px"), :controller => 'projects', :action => 'index' %> <%= link_to image_tag("/images/welcome/2.png", weight:"200px", height:"200px"), :controller => 'bids', :action => 'index' %> <%= link_to image_tag("/images/welcome/3.png", weight:"200px", height:"200px") %> <%= call_hook :view_account_login_top %> +
    + <%= form_tag(signin_path) do %> + <%= back_url_hidden_field_tag %> + <% unless User.current.logged? %> + + + + + + + + + + <% if Setting.openid? %> + + + + + <% end %> + + + + + + + + +
    <%= text_field_tag 'username', params[:username], :tabindex => '1' %>
    <%= password_field_tag 'password', nil, :tabindex => '2' %>
    <%= text_field_tag "openid_url", nil, :tabindex => '3' %>
    <% if Setting.autologin? %> <% end %>
    <% if Setting.lost_password? %> + <%= link_to l(:label_password_lost), lost_password_path %> + <% end %> + +
    + <% else %> +
    + + + + - - - - - - - + + + + + +
    <%= l(:label_welcome) %> <%= User.current.name%> <%= l(:label_join) %>
    创建新项目,让我们开启一次神奇的开源之旅! 为你所想,发布需求,体验答案找上门的兴奋感觉! 课程小社区,创建新课程,让我们共同分享多到想不到的公共资源!
    <%= image_tag(url_to_avatar(User.current), :class => 'avatar') %><%= l(:label_user_watcher) %> (<%= link_to User.watched_by(User.current).count %>)  + <%= render :partial => "watchers/fans_num",:locals => {:fans_num => get_fans_num(User.current) }%>
    <% unless User.current.memberships.empty? %> + <%= l(:label_contribute_to, :project_count => "#{User.current.memberships.count}") %> <% end %>
    + +
    + <% end %> + <% end %> +
    <%= call_hook :view_account_login_bottom %> + + <% if params[:username].present? %> + <%= javascript_tag "$('#password').focus();" %> + <% else %> + <%= javascript_tag "$('#username').focus();" %> + <% end %>
    + +
    + + + + + + + - -
    -
    <%= l(:label_features) %> -
    -
    -
    -
    <%= link_to image_tag("/images/welcome/1.png", weight:"190px", height:"190px"), :controller => 'projects', :action => 'index' %><%= link_to image_tag("/images/welcome/2.png", weight:"190px", height:"190px"), :controller => 'bids', :action => 'index' %><%= link_to image_tag("/images/welcome/3.png", weight:"190px", height:"190px") %>
    - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - -
    <%= image_tag("/images/welcome/discuss.png", weight:"30px", height: "26px") %><%= l(:label_board) %> <%= image_tag("/images/welcome/news.png", weight:"30px", height: "26px") %><%= l(:label_news) %> <%= image_tag("/images/welcome/boards.png", weight:"30px", height: "26px") %><%= l(:label_milestone) %>
    <%= l(:label_create_new_projects_description) %><%= l(:label_call_for_bids_description) %><%= l(:label_create_course_description) %>
    +
    + <%= l(:label_features) %>
    +
    +
    <%= image_tag("/images/welcome/discuss.png", weight:"30px", height: "26px") %><%= l(:label_board) %> <%= image_tag("/images/welcome/news.png", weight:"30px", height: "26px") %><%= l(:label_news) %> <%= image_tag("/images/welcome/boards.png", weight:"30px", height: "26px") %><%= l(:label_milestone) %>
    七嘴八舌,汇聚众人智慧,为您排忧解难! 实时了解项目的最新动态,掌握最新项目咨询! 在这里您可以可以看见任何一个版本的工程!
    -
    -
    + <%= l(:label_board_description) %> + + <%= l(:label_news_description) %> + + <%= l(:label_milestone_description) %> + +
    - +
    diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index ceaba1ed5..1f9b3a76b 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -489,7 +489,7 @@ en-GB: label_information: Information label_information_plural: Information label_please_login: Please log in - label_register: Register + label_register: Sign up label_login_with_open_id_option: or login with OpenID label_password_lost: Lost password label_home: Home @@ -498,7 +498,7 @@ en-GB: label_my_projects: My projects label_my_page_block: My page block label_administration: Administration - label_login: Sign in + label_login: Login label_logout: Sign out label_help: Help label_reported_issues: Reported issues diff --git a/config/locales/en.yml b/config/locales/en.yml index 0a7b9e3a5..30f22e5df 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -531,7 +531,7 @@ en: label_information: Information label_information_plural: Information label_please_login: Please log in - label_register: Register + label_register: Sign up label_login_with_open_id_option: or login with OpenID label_password_lost: Lost password label_home: Home @@ -540,7 +540,7 @@ en: label_my_projects: My projects label_my_page_block: My page block label_administration: Administration - label_login: Sign in + label_login: Login label_logout: Sign out label_help: Help label_reported_issues: Reported issues @@ -766,7 +766,8 @@ en: label_disabled: disabled label_show_completed_versions: Show completed versions label_me: me - label_board: Forum + label_board: Forums + label_board_description: Rushes,brought together all wisdom,solve problems for you! label_board_new: New forum label_board_plural: Forums label_board_locked: Locked @@ -1196,11 +1197,13 @@ en: label_cancel_praise: cancel praise label_bid_reason: Please show your reason default_tracker_task: Task - label_create_new_projects: Create projects - label_call_for_bids: Call for bids - label_create_course: Create courses + label_create_new_projects_description: Create a new project,let us open a magical journey of collaborative creation and development! + label_call_for_bids_description: As you might expect,show your requirement,experience the feeling of excitement that find the answer! + label_create_course_description: Curriculum small communities,create new courses,let us share more to think of public resources! label_news: News + label_news_description: Real getting the project's latest developments,obtain the latest project information! label_milestone: Milestone + label_milestone_description: Here you can see any version of the project! label_features: Features label_has_praisers: praisers(%{count}) label_has_watchers: watchers(%{count}) @@ -1216,4 +1219,6 @@ en: label_about_requirement: about requirement: label_about_issue: about issue: label_quote_my_words: quoted my words - label_have_respond: had a respond \ No newline at end of file + label_have_respond: had a respond + label_welcome: Welcome + label_join: join Trustie! \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 9a8217b02..576c7a272 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -261,7 +261,7 @@ zh: field_last_login_on: 最后登录 field_language: 语言 field_effective_date: 日期 - field_password: 密码: + field_password: 密码 field_new_password: 新密码 field_password_confirmation: 确认 field_version: 版本 @@ -1232,3 +1232,13 @@ zh: label_in_bids: 在需求: label_in_users: 在用户: label_have_respond: 进行了反馈 + label_have_respond: 进行了反馈 + label_create_new_projects_description: 创建项目,让我们开启一次神奇的协同创作和开发之旅! + label_call_for_bids_description: 为你所想,发布需求,体验答案找上门的兴奋感觉! + label_news_description: 实时了解项目的最新动态,掌握最新项目咨询! + label_milestone_description: 在这里您可以看见任何一个版本的工程! + label_have_respond: 进行了反馈 + label_welcome: 欢迎 + label_join: 加入Trustie! + label_board_description: 七嘴八舌,汇聚众人智慧,为您排忧解难! + label_create_course_description: 课程小社区,创建新课程,让我们共同分享多到想不到的公共资源! \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 72e8ca27c..5a024082c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -23,8 +23,8 @@ RedmineApp::Application.routes.draw do get "tags/show" get "praise_tread/praise_plus" - get "praise_tread/praise_minus" - get "praise_tread/tread_minus" + + get "praise_tread/tread_plus" root :to => 'welcome#index', :as => 'home' @@ -442,7 +442,7 @@ RedmineApp::Application.routes.draw do match 'tags/delete_tag',:to => 'tags#delete_tag',:as=>"add_tag" match 'tags/show_all',:to => 'tags#show_all' match 'parise_tread/praise_plus',:to => 'parise_tread#praise_plus',:as=>"praise" - match 'parise_tread/tread_minus',:to => 'parise_tread#tread_minus',:as=>"tread" + match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread" end diff --git a/public/images/praise_tread/praise_false.png b/public/images/praise_tread/praise_false.png new file mode 100644 index 000000000..ed63e619d Binary files /dev/null and b/public/images/praise_tread/praise_false.png differ diff --git a/public/images/praise_tread/praise_true.png b/public/images/praise_tread/praise_true.png new file mode 100644 index 000000000..e3ca14b5a Binary files /dev/null and b/public/images/praise_tread/praise_true.png differ diff --git a/public/images/praise_tread/tread_false.png b/public/images/praise_tread/tread_false.png new file mode 100644 index 000000000..26f146083 Binary files /dev/null and b/public/images/praise_tread/tread_false.png differ diff --git a/public/images/praise_tread/tread_true.png b/public/images/praise_tread/tread_true.png new file mode 100644 index 000000000..b0a8ac7fa Binary files /dev/null and b/public/images/praise_tread/tread_true.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index fe008c51c..5ff2458c5 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -11,6 +11,11 @@ h4 {border-bottom: 1px dotted #bbb;} /*new by huang*/ /**/ +.welcome_logo{ + float: left; + padding-left: 5px; + padding-top: 2px; +} .welcome_images{ width: 200px; height: 200px; @@ -154,7 +159,7 @@ ul.tool li{list-style-type:none; .font_lighter2{ font-family:微软雅黑; color:#9a9a9a; - font-size:12px; + font-size:14px; } .font_lighter_welcome{ @@ -191,7 +196,7 @@ ul.tool li{list-style-type:none; .spaceright{float:left; width:620px;} .welcone_left{ - margin-top: 70px; + margin-top: 50px; margin-left: 90px; float:left; width: 49%; @@ -224,6 +229,11 @@ ul.tool li{list-style-type:none; padding-bottom: 8px; } .inf_user_image img.avatar2{ + background: rgb(245, 245, 245); + padding: 4px; + border: 1px solid #e5dfc7; + float: left; + display: block; height:80px; width: 80px; @@ -545,7 +555,7 @@ ul.newprojects2 li{ padding: 0px 0px 0px 0px; white-space:nowrap; } -#top-menu a {color: #000000; margin-right: 8px; font-weight: bold;} +#top-menu a {color: #fff; margin-right: 8px; font-weight: bold;} #top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; } #account {float:right;} diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 125c25076..032ba732a 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -376,7 +376,7 @@ ul.projects li.root #top-menu ul { - margin-left: 60px; /*add by huang*/ + margin-left: 0px; /*add by huang*/ padding-right: 1px; }