From 7a685c531de01a126de82b9e18d0ea0467628583 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 14:57:41 +0800 Subject: [PATCH 1/9] =?UTF-8?q?#1039=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E8=AF=A5=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/diff.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb index 9416e551c..97630153a 100644 --- a/app/views/repositories/diff.html.erb +++ b/app/views/repositories/diff.html.erb @@ -16,9 +16,9 @@ <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %> <% end -%> -<% other_formats_links do |f| %> - <%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %> -<% end %> +<%# other_formats_links do |f| %> + <%#= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %> +<%# end %> <% html_title(with_leading_slash(@path), 'Diff') -%> From 5b91356463720c2f7b66f0faeb0667b49d8b2a21 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 15:13:26 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8--?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8F=8F=E8=BF=B0=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/redpenny-master/stylesheets/application.css | 1 - 1 file changed, 1 deletion(-) diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 098e02be2..58183ce3d 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1058,7 +1058,6 @@ float: left; margin-left: 20px; margin-top: 10px; width: 470px; -max-height: 121px; font-family: '微软雅黑'; /*modify by men*/ color: rgb(0, 0, 0); font-size: 13px; From 43fdec3f41ab69b43da9ea5ddd27d8b10153a4ba Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 16:30:32 +0800 Subject: [PATCH 3/9] =?UTF-8?q?#982=E5=AF=B9Micros=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=88=A4=E6=96=AD=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?Micros=E7=89=88=E6=B3=A8=E5=86=8C=E7=94=A8=E6=88=B7=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8D=95=E4=BD=8D=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 3cb4fad80..8f118de05 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -16,7 +16,7 @@ function get_options(value) { $.ajax({ type: "POST", - url: '/school/get_options/' + encodeURIComponent(value), + url: '<%= Setting.host_name == "micros.nudt.edu.cn" ? '/ros/school/get_options/' : '/school/get_options/'%>' + encodeURIComponent(value), data: 'text', success: function (data) { $("#province").val(value) From 9ba6fe13a3c16da8ba0cda2875902b30d07618e8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 16:42:59 +0800 Subject: [PATCH 4/9] =?UTF-8?q?#1307=20=E4=BF=AE=E5=A4=8Dtrustie-forge?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=AD--=E8=AE=A8=E8=AE=BA=E5=8C=BA--?= =?UTF-8?q?=E5=9B=9E=E5=B8=96=E6=98=BE=E7=A4=BA=E8=B6=85=E5=87=BA=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d7bf08fb5..8e6d5f439 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -277,7 +277,8 @@ span.forums-avatar-right{ .borad-text-list{ margin-bottom: 10px; border-bottom: 1px dashed rgb(204, 204, 204); - width: 680px; + width: 680px; + table-layout: fixed; } .borad-message{ From 23ad3f26e480ce0d3c1d448653f1f71ce6ea0d0c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 16:49:48 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbid=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=B8=ADbudget=E7=9A=84format=E6=8A=A5=E9=94=99=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/bid.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/bid.rb b/app/models/bid.rb index 038c45cd5..02569ade1 100644 --- a/app/models/bid.rb +++ b/app/models/bid.rb @@ -42,9 +42,9 @@ class Bid < ActiveRecord::Base validates :author_id, presence: true validates :deadline, presence: true, format: {:with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/} validates :name, length: {maximum: NAME_LENGTH_LIMIT} - validates :budget, - format: {with : /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/, if: Proc.new { |p| p.reward_type == 1 }}, - format: {with: /^(\d+)$|^(\d+).([0-9]{1})$/, if: Proc.new { |p| p.reward_type == 3 }} + validates :budget, format: { with: ->(p) { if p.reward_type == 1 then /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/ + elsif p.reward_type == 3 then /^(\d+)$|^(\d+).([0-9]{1})$/ end } } + validate :validate_user validate :validate_reward_type after_create :act_as_activity From 4b408241113647caf2d5e3adb60f4d047df80416 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 17:04:46 +0800 Subject: [PATCH 6/9] =?UTF-8?q?#1341=E4=BF=AE=E5=A4=8D=E5=88=9B=E6=96=B0?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B--=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80?= =?UTF-8?q?=EF=BC=9A=E5=9B=9E=E5=A4=8D=E7=95=99=E8=A8=80=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8D=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/_history.html.erb | 6 +----- app/views/contests/show_contest.html.erb | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/views/contests/_history.html.erb b/app/views/contests/_history.html.erb index f59bc0fc7..b62f91146 100644 --- a/app/views/contests/_history.html.erb +++ b/app/views/contests/_history.html.erb @@ -32,7 +32,6 @@ <% if reply_allow %> - <%#= link_to(l(:button_quote), {:controller => 'contests', :action => 'new', :id => contest, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%> <%= link_to(l(:button_quote), contests_path(:id => contest, :journal_id => journal), @@ -43,15 +42,12 @@ <%= link_to l(:label_bid_respond_quote), '', {:focus => 'project_respond', - :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;" + :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user}: '); $('##{ids} textarea') ;return false;" } %> <% end %> <% if @user==User.current|| User.current.admin? %> - <%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm), - :remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> - <%= link_to(l(:label_bid_respond_delete), words_destroy_path(:user_id => @user, :object_id => journal), diff --git a/app/views/contests/show_contest.html.erb b/app/views/contests/show_contest.html.erb index 5435f67fe..cc1210751 100644 --- a/app/views/contests/show_contest.html.erb +++ b/app/views/contests/show_contest.html.erb @@ -19,10 +19,6 @@

<%= @contest.description %> -
<%= render :partial => "/praise_tread/praise_tread", From e765445279fc725d594fbea844a9bb090e906155 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 17:11:33 +0800 Subject: [PATCH 7/9] =?UTF-8?q?#1298=E4=BF=AE=E5=A4=8D=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E7=AE=80=E4=BB=8B=E8=B6=85=E5=87=BA=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contests/show_attendingcontest.html.erb | 10 +-- app/views/softapplications/show.html.erb | 72 ++++++++++--------- 2 files changed, 39 insertions(+), 43 deletions(-) diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index 3ba3e73ba..9d5b08ea9 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -102,8 +102,6 @@ - -
<%= render "new_softapplication" %>
@@ -114,12 +112,6 @@ <%= link_to l(:label_user_login_new), signin_path %> <% end %> - - - - - -
@@ -230,7 +222,7 @@
-
+
<%= l(:label_profile) %>: diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index 1410563c3..1d6d46e9e 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -1,7 +1,4 @@ <%= render :partial => 'layouts/base_softapplication_top_content' %> - - -
@@ -16,46 +13,55 @@ - <%=l(:label_attendingcontestwork_belongs_type)%>:<%= @softapplication.app_type_name %> + + <%=l(:label_attendingcontestwork_belongs_type)%>: + <%= @softapplication.app_type_name %> <% contest = @softapplication.contests.first %> - <%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %> + + <%=l(:label_attendingcontestwork_belongs_contest)%>: + <%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %> + - <%=l(:label_attendingcontestwork_release_person)%>:<%= @softapplication.user.name %> - <%=l(:label_attendingcontestwork_adaptive_system)%>:<%= @softapplication.android_min_version_available %> + + <%=l(:label_attendingcontestwork_release_person)%>: + <%= @softapplication.user.name %> + + + <%=l(:label_attendingcontestwork_adaptive_system)%>: + <%= @softapplication.android_min_version_available %> + <%=l(:label_attendingcontestwork_download)%>: - - <% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %> - + + <% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %> + - - <%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %> - - - <%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %> - <%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %> - - - - <% if @project %> - <%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %> - <% end %> - - + <%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %> + + + <%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %> + <%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %> + + + + <% if @project %> + <%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %> + <% end %> + +
-
+
<%=l(:label_work_description)%>:
-
<%= @softapplication.description %>
@@ -102,7 +108,9 @@
    <% @image_results.take(4).each do |attachment| %>
  • - + <%= link_to_attachment_img attachment, :class => "soft-application", :download => "true"%>
  • <% end %> @@ -114,14 +122,14 @@
    -
    <%=l(:label_work_comment)%>:
    +
    + <%=l(:label_work_comment)%>: +
    <% if (User.current.logged? and User.current.id != @softapplication.user_id) %>
    <%=l(:label_work_rating)%>: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %> (<%=l(:label_attendingcontestwork_sorting_intimation)%>)
    <% end %> -
    -
    <%= render :partial => 'message_history', :locals => {:contest => @softapplication, :journals => @jour, :state => false} %> @@ -133,7 +141,3 @@ <%= pagination_links_full @feedback_pages %>
- - -
-
From d541309455af5b8fccd3a324f9c75d17d777ed38 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 17:24:49 +0800 Subject: [PATCH 8/9] =?UTF-8?q?#1295=E5=8F=96=E6=B6=88=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E8=BF=99=E7=9A=84=E5=85=B3=E6=B3=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_contest.html.erb | 81 ++++++++++++---------- app/views/layouts/base_newcontest.html.erb | 80 ++++++++++++--------- 2 files changed, 93 insertions(+), 68 deletions(-) diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index 740016ff8..ae44933ab 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -27,27 +27,27 @@
- - - - - - - - - - -
<%=l(:label_contest_innovate_community)%><%= l(:label_user_location) %> : - -
<%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> > - <%= link_to @bid.name, bid_path %>
+ + + + + + + + + + +
<%=l(:label_contest_innovate_community)%><%= l(:label_user_location) %> : + +
<%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> > + <%= link_to @bid.name, bid_path %>
@@ -86,10 +91,14 @@
- - + + diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index adce80d24..d8945a5dc 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -5,19 +5,17 @@ - - <%= h html_title %> - - - <%= csrf_meta_tag %> - <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %> + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> - <%= javascript_heads %> <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> - <%= yield :header_tags -%> @@ -26,12 +24,15 @@
<%=render :partial => 'layouts/base_header'%>
-
<%=link_to "#{@bid.join_in_contests.count}",:controller => "bids", - :action => "show_participator" %><%=link_to "#{@bid.projects.where('is_public=1').count}", :controller => 'bids', - :action => 'show_project' %> + <%=link_to "#{@bid.join_in_contests.count}",:controller => "bids", + :action => "show_participator" %> + + <%=link_to "#{@bid.projects.where('is_public=1').count}", :controller => 'bids', + :action => 'show_project' %> +
<%= l(:label_participator) %> <%= l(:label_bidding_project) %>
- - + + - +
<%=l(:label_contest_innovate_community)%><%= l(:label_user_location) %> : + <%=l(:label_contest_innovate_community)%> + + <%= l(:label_user_location) %> : +
<%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %> + <%=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 h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %> + + <%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %> +
@@ -61,17 +66,19 @@ <%= image_tag(url_to_avatar(@user), :class => "avatar2") %> - - + <% if User.current.login? %> <% end %> @@ -80,12 +87,17 @@ <% if (@contest.author.id == User.current.id) || User.current.admin? %> <% end %> @@ -116,7 +128,6 @@ - @@ -128,13 +139,22 @@
<%= link_to @contest.name, show_contest_contest_path(@contest) %> + <%= link_to @contest.name, show_contest_contest_path(@contest) %> +
- - <%= new_watcher_link(@contest, User.current) %> + + <%= new_watcher_link(@contest, User.current) unless (@contest.author.id == User.current.id) || User.current.admin? %> +
- <%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %> + + <%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %> +
- <%= link_to l(:label_contest_delete), {:controller => 'contests', :action => 'destroy_contest', :id => @contest}, data: { confirm: '你确定要删除该竞赛吗?' }, method: :delete %> + + <%= link_to l(:label_contest_delete), {:controller => 'contests', :action => 'destroy_contest', :id => @contest}, + data: { confirm: '你确定要删除该竞赛吗?' }, method: :delete %> +
<%= l(:label_contest_watchers) %> <%= l(:label_contest_work) %>
- + - + - +
<%= l(:lable_contest_user) %>: <%= link_to(@user.name, user_path(@user))%> + <%= l(:lable_contest_user) %>:  + <%= link_to(@user.name, user_path(@user))%> +
<%= l(:label_bids_reward_method) %><%= @contest.budget%> + <%= l(:label_bids_reward_method) %> + <%= @contest.budget%> +
<%= l(:label_limit_time) %> : <%= @contest.deadline%> + <%= l(:label_limit_time) %> : + <%= @contest.deadline%> +
@@ -156,7 +176,10 @@
<% end %>
- <%= l(:label_create_time) %>:<%= format_time(@contest.created_on) %> + + <%= l(:label_create_time) %>: + + <%= format_time(@contest.created_on) %>
@@ -173,7 +196,6 @@
-
@@ -193,22 +215,16 @@
- - - -
-
-
<% if display_main_menu?(@contest) %>
From 3ad8ac4378636e8dcde55112f552e93602431499 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Oct 2014 17:36:41 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E7=BC=BA=E9=99=B7=E5=90=8D=E7=A7=B0=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index d65a93c6c..4d4ac256c 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -27,7 +27,7 @@
    <% unless issue.author.nil? || issue.author.name == "Anonymous" %> -
      +
        <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %> <%= l(:label_post_on)%> <% a = [] %> <% a << column_content[1] %>