From d3725cc44c3488994995f172986921c019ee7a95 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 25 Oct 2013 15:01:54 +0800 Subject: [PATCH 1/3] fixed translations --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index da9756041..7b766249e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -445,6 +445,7 @@ zh: project_module_boards: 讨论区 project_module_calendar: 日历 project_module_gantt: 甘特图 + label_module_share: DTS测试工具 label_user: 用户 label_user_plural: 用户 @@ -1643,7 +1644,6 @@ zh: label_noawards: 未评奖 label_course_modify_settings: 配置课程 - label_module_share: dts测试工具 label_homework_prompt: 贴心小提示: label_homework_prompt_content: 亲,在这里我们的作业将以项目的形式提交,如果小伙伴们还没有创建项目,请先创建一个项目。项目创建成功后,就可以 label_create_homework: 布置了作业: From 6dec8a931210c001ffbacf6a718931a906e4b9a0 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 25 Oct 2013 15:46:14 +0800 Subject: [PATCH 2/3] share previews --- app/views/shares/_form.html.erb | 50 ++++++++------- app/views/shares/new.html.erb | 10 +-- public/stylesheets/nyan.css | 107 ++++++++++++++++---------------- 3 files changed, 85 insertions(+), 82 deletions(-) diff --git a/app/views/shares/_form.html.erb b/app/views/shares/_form.html.erb index 262978369..160eebfc1 100644 --- a/app/views/shares/_form.html.erb +++ b/app/views/shares/_form.html.erb @@ -1,23 +1,27 @@ -
- <%= form_for(@share) do |f| %> -
- 分享到项目: - <%= f.select 'project_id', options_from_collection_for_select(@ps, "id", "name") %>
-
- <%= f.text_field :title, :style => 'width: 399px;display: none;' %> -
- -
- <%= f.text_area :description, :rows => 4, :style => 'width: 100%;resize: none;', :class => 'create-share' %> -
-
- <%= f.label "Website:" %>
- <%= f.text_field :url, :style => 'width: 100%;', :class => 'create-share' %> -
- -
- <%= f.submit :value=>"分享"%> -
- <% end %> -
-
+
+ <%= form_for(@share) do |f| %> +
+
+ 分享到: + <%= f.select 'project_id', options_from_collection_for_select(@ps, "id", "name") %> +
+
+
+
+ <%= f.text_field :title, :style => 'width: 399px;display: none;' %> +
+ +
+ <%= f.text_area :description, :rows => 4, :style => 'width: 100%;resize: none;', :class => 'create-share' %> +
+
+ <%= f.label "Website:" %>
+ <%= f.text_field :url, :style => 'width: 100%;', :class => 'create-share' %> +
+ +
+ <%= f.submit :value=>"分享" ,:class => 'whiteButton', :style => 'font-size: 14px; padding: 3px' %> +
+<% end %> +
+
diff --git a/app/views/shares/new.html.erb b/app/views/shares/new.html.erb index 21ac28429..8abb38376 100644 --- a/app/views/shares/new.html.erb +++ b/app/views/shares/new.html.erb @@ -1,5 +1,5 @@ -

分享

- -<%= render 'form' %> - -<%= link_to 'Back', shares_path %> + + +<%= render 'form' %> + + diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index f15ea4ac2..d4ede21b7 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -1,55 +1,54 @@ -/*add by nyan*/ -.whiteButton { - - -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; - -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; - box-shadow:inset 0px 1px 0px 0px #ffffff; - - background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6)); - background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0); - - background-color:#ffffff; - - -moz-border-radius:6px; - -webkit-border-radius:6px; - border-radius:6px; - - border:1px solid #dcdcdc; - - display:inline-block; - color:#666666; - font-family:arial; - font-size:15px; - font-weight:bold; - padding:6px 24px; - text-decoration:none; - - text-shadow:0px 1px 0px #ffffff; - -} -.whiteButton:hover { - - background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff)); - background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0); - - background-color:#f6f6f6; -} -.whiteButton:active { - position:relative; - top:1px; -} - -#share_project_id { - float: right; - width: 100%; +/*add by nyan*/ +.whiteButton { + + -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; + -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; + box-shadow:inset 0px 1px 0px 0px #ffffff; + + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6)); + background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); + background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); + background:-o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); + background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); + background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0); + + background-color:#ffffff; + + -moz-border-radius:6px; + -webkit-border-radius:6px; + border-radius:6px; + + border:1px solid #dcdcdc; + + display:inline-block; + color:#666666; + font-family:arial; + font-size:15px; + font-weight:bold; + padding:6px 24px; + text-decoration:none; + + text-shadow:0px 1px 0px #ffffff; + +} +.whiteButton:hover { + + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff)); + background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); + background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); + background:-o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); + background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); + background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0); + + background-color:#f6f6f6; +} +.whiteButton:active { + position:relative; + top:1px; +} + +#share_label { + line-height: 1.4em } \ No newline at end of file From 1f8c10e48a39f64f16d8ac21aadcb51f58b3198d Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Mon, 28 Oct 2013 08:51:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=0D=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 235e28792..00d60867a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -311,13 +311,13 @@ class UsersController < ApplicationController else @offset ||= @user_pages.reverse_offset unless @offset == 0 - @users_statuses = scope.reorder('changesets_count').offset(@offset).limit(@limit).all.reverse + @users_statuses = scope.reorder('grade').offset(@offset).limit(@limit).all.reverse else limit = @user_count % @limit if limit == 0 limit = @limit end - @users_statuses = scope.reorder('changesets_count').offset(@offset).limit(limit).all.reverse + @users_statuses = scope.reorder('grade').offset(@offset).limit(limit).all.reverse end @s_type = 1 # @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }