Date: Tue, 16 Sep 2014 09:22:27 +0800
Subject: [PATCH 06/29] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E6=8F=8F=E8=BF=B0?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E6=9F=A5=E7=9C=8B=E7=BB=86=E8=8A=82?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=A2=E5=A4=B1?=
=?UTF-8?q?=EF=BC=8C=E5=8E=9F=E5=9B=A0=EF=BC=9A=E4=B8=BA=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?layout=EF=BC=8C=E8=A7=A3=E5=86=B3=EF=BC=9A=E5=8A=A0=E4=B8=8Alay?=
=?UTF-8?q?out?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/journals_controller.rb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb
index 28505a047..77ee9d648 100644
--- a/app/controllers/journals_controller.rb
+++ b/app/controllers/journals_controller.rb
@@ -54,6 +54,11 @@ class JournalsController < ApplicationController
end
(render_404; return false) unless @issue && @detail
@diff = Redmine::Helpers::Diff.new(@detail.value, @detail.old_value)
+ respond_to do |format|
+ format.html {
+ render :layout => 'project_base'
+ }
+ end
end
def new
From 6b4e2ae37b55b1fcdcecef67e3655cf693ae288c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 09:33:27 +0800
Subject: [PATCH 07/29] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=86=E7=B1=BB=E4=B8=8B=E6=8B=89=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E9=80=89=E9=A1=B9=202.=E4=BF=AE=E6=94=B9=E7=AB=9E?=
=?UTF-8?q?=E8=B5=9B=E6=A0=87=E9=A2=98=E4=B8=BA=E5=85=A8=E9=83=A8=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=20=E4=BF=AE=E6=94=B9=E6=80=9D=E8=B7=AF=EF=BC=9A?=
=?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_newcontest.html.erb | 2 +-
.../20140916005319_update_works_categories.rb | 26 +++++++++++++++
db/schema.rb | 32 +++++++++----------
3 files changed, 42 insertions(+), 18 deletions(-)
create mode 100644 db/migrate/20140916005319_update_works_categories.rb
diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb
index 9fef1e3e6..c8e78d7f5 100644
--- a/app/views/layouts/base_newcontest.html.erb
+++ b/app/views/layouts/base_newcontest.html.erb
@@ -65,7 +65,7 @@
- <%= link_to h(truncate(@contest.name, length: 13, omission: '...')), show_contest_contest_path(@contest) %>
+ <%= link_to @contest.name, show_contest_contest_path(@contest) %>
<% if User.current.login? %>
diff --git a/db/migrate/20140916005319_update_works_categories.rb b/db/migrate/20140916005319_update_works_categories.rb
new file mode 100644
index 000000000..e4cf812bf
--- /dev/null
+++ b/db/migrate/20140916005319_update_works_categories.rb
@@ -0,0 +1,26 @@
+# -*coding:utf-8 -*-
+class UpdateWorksCategories < ActiveRecord::Migration
+ def up
+ WorksCategory.all.each do |wc|
+ wc.destroy
+ end
+
+ workscategory1 = WorksCategory.new
+ workscategory1.category = "开源软件"
+ workscategory1.save
+
+ workscategory2 = WorksCategory.new
+ workscategory2.category = "移动APP"
+ workscategory2.save
+
+ workscategory3 = WorksCategory.new
+ workscategory3.category = "其他"
+ workscategory3.save
+ end
+
+ def down
+ WorksCategory.all.each do |wc|
+ wc.destroy
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 95c52cca3..ebf24f547 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 => 20140826072838) do
+ActiveRecord::Schema.define(:version => 20140916005319) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -878,18 +878,18 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
create_table "relative_memos", :force => true do |t|
t.integer "osp_id"
t.integer "parent_id"
- t.string "subject", :null => false
- t.text "content", :null => false
+ t.string "subject", :null => false
+ t.text "content", :limit => 16777215, :null => false
t.integer "author_id"
- t.integer "replies_count", :default => 0
+ t.integer "replies_count", :default => 0
t.integer "last_reply_id"
- t.boolean "lock", :default => false
- t.boolean "sticky", :default => false
- t.boolean "is_quote", :default => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.integer "viewed_count_crawl", :default => 0
- t.integer "viewed_count_local", :default => 0
+ t.boolean "lock", :default => false
+ t.boolean "sticky", :default => false
+ t.boolean "is_quote", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "viewed_count_crawl", :default => 0
+ t.integer "viewed_count_local", :default => 0
t.string "url"
t.string "username"
t.string "userhomeurl"
@@ -976,10 +976,11 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.string "url"
t.string "title"
t.integer "share_type"
- 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.integer "project_id"
t.integer "user_id"
+ t.string "description"
end
create_table "softapplications", :force => true do |t|
@@ -1085,8 +1086,8 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.integer "identity"
t.string "technical_title"
+ t.integer "identity"
t.string "student_id"
t.string "teacher_realname"
t.string "student_realname"
@@ -1144,9 +1145,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
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|
From e3889ed6aa9405b983befc7c57c37f72fe1c7647 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 09:49:57 +0800
Subject: [PATCH 08/29] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E7=AB=9E=E8=B5=9B=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/welcome/contest.html.erb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index 4f8350fa2..73c09c6ec 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -155,10 +155,17 @@
-
<%=l(:label_current_hot_contest)%>
-
<%= link_to l(:label_more_information), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
+
+ <% if User.current.logged? %>
+ <% unless User.current.user_extensions.identity == 1 %>
+ <%= link_to(l(:label_newtype_contest), {:controller => 'bids', :action => 'new_contest'}, :class => 'icon icon-add') %>
+ <% end %>
+ <% end %>
+
+ <%= link_to l(:label_more_information), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
+
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
@@ -169,7 +176,6 @@
-
<%= link_to(contest.name, contest_contestnotifications_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
(<%= link_to("#{contest.projects.where('is_public=1').count}"+l(:label_work_quantity), show_attendingcontest_contest_path(contest), :target => "_blank") %> )
From d1435e07d407fcb6660de09de902fa4c84ff2c32 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 09:54:55 +0800
Subject: [PATCH 09/29] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=9A=90=E8=97=8F?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BE=AE=E4=BF=A1=E6=89=AB=E7=A0=81=20#1152?=
=?UTF-8?q?=20=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A=E5=B0=86?=
=?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=89=AB=E7=A0=81=E4=BD=9C=E4=B8=BA=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=E7=8B=AC=E7=AB=8B=E7=9A=84=E8=BF=9E=E6=8E=A5=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=9A=90=E8=97=8F=E8=BF=9E=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/contests/index.html.erb | 12 ------------
app/views/welcome/_wei_xin.html.erb | 4 ++++
app/views/welcome/contest.html.erb | 5 +----
app/views/welcome/course.html.erb | 5 +----
app/views/welcome/index.html.erb | 9 +++------
5 files changed, 9 insertions(+), 26 deletions(-)
create mode 100644 app/views/welcome/_wei_xin.html.erb
diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb
index 60608fd89..c166f73ab 100644
--- a/app/views/contests/index.html.erb
+++ b/app/views/contests/index.html.erb
@@ -7,10 +7,6 @@
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
-
<%= link_to(l(:label_newtype_contest), contest_new_contest_path, :class => 'icon icon-add', :target => "_blank") %>
<% end %>
@@ -27,20 +23,12 @@
-
<%= link_to request.host()+"/contests", contests_path %>
<%=link_to l(:field_homepage), home_path %> >
-
<%=link_to l(:label_contest_innovate), :controller => 'contests', :action => 'index' %>
diff --git a/app/views/welcome/_wei_xin.html.erb b/app/views/welcome/_wei_xin.html.erb
new file mode 100644
index 000000000..39902cf89
--- /dev/null
+++ b/app/views/welcome/_wei_xin.html.erb
@@ -0,0 +1,4 @@
+
+ <%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
+
微信扫码
+
\ No newline at end of file
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index 73c09c6ec..dbc2d8f1b 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -120,10 +120,7 @@
})();
-
- <%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
-
<%=l(:label_weixin)%>
-
+ <%#= render partial: 'wei_xin' %>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index 9ec745f87..a94998639 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -32,10 +32,7 @@
-
- <%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
-
微信扫码
-
+ <%#= render partial: 'wei_xin' %>
<%= image_tag(@logoLink, width:@course_page.image_width,height: @course_page.image_height) %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index b73f0970f..83d1fef28 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -29,10 +29,7 @@
-
- <%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
-
微信扫码
-
+ <%#= render partial: 'wei_xin' %>
@@ -42,7 +39,7 @@
<%= image_tag '/images/transparent.png', width:@first_page.image_width,height: @first_page.image_height %>
<% end %>
-
+
<% unless @first_page.nil? %>
@@ -50,7 +47,7 @@
<% end %>
- <%= render :partial => "search_project", :locals => {:project_type => 0}%>
+ <%= render :partial => "search_project", :locals => {:project_type => 0}%>
From 8cc14546f89d2af0dba81270e88fd59001c286bd Mon Sep 17 00:00:00 2001
From: z9hang
Date: Tue, 16 Sep 2014 10:27:20 +0800
Subject: [PATCH 10/29] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7?=
=?UTF-8?q?=E9=99=84=E4=BB=B6=E8=B5=84=E6=BA=90=E4=BF=AE=E6=94=B9=E4=B8=BA?=
=?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E4=B9=9F=E5=8F=AF=E4=BB=A5=E4=B8=8B?=
=?UTF-8?q?=E8=BD=BD=EF=BC=8C=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E7=A7=81?=
=?UTF-8?q?=E6=9C=89=E6=A0=87=E7=AD=BE=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/attachments_controller.rb | 2 +-
app/helpers/projects_helper.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 4525176ac..62bef8fb1 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -361,7 +361,7 @@ private
def login_without_softapplication
referer = request.headers['Referer']
- require_login unless referer =~ /softapplication/
+ require_login unless referer =~ /softapplication/ || referer =~ /memos/
end
def renderTag
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index dfacff864..47f33f34a 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -181,7 +181,7 @@ module ProjectsHelper
# unless project.is_public == 1
if project.is_public != 1
- s = "#{l(:lable_private)} ".html_safe
+ s = "#{l(:label_private)} ".html_safe
else
s = "".html_safe
end
@@ -197,7 +197,7 @@ module ProjectsHelper
if !project.is_public
# end longjun
- s = "#{l(:lable_private)} ".html_safe
+ s = "#{l(:label_private)} ".html_safe
else
s = "".html_safe
end
From 1b97361ec6943599f4252bc4c1342daa2d583914 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 10:42:17 +0800
Subject: [PATCH 11/29] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=9B=9E=E5=A4=8D=E4=B8=8D=E4=BC=9A?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E5=8F=B7=202.=E6=9C=AC=E5=9C=B0?=
=?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_course_show.html.erb | 4 --
app/views/messages/_form.html.erb | 67 +++++++++++++-----------
app/views/welcome/_more_course.html.erb | 2 +-
app/views/welcome/contest.html.erb | 2 +-
app/views/welcome/course.html.erb | 2 +-
config/locales/zh.yml | 7 ++-
6 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index a11107a9b..2b834cf0a 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -173,10 +173,6 @@
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
<% end %>
-
-
-
-
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb
index 6581a5b11..ddd55bc96 100644
--- a/app/views/messages/_form.html.erb
+++ b/app/views/messages/_form.html.erb
@@ -1,39 +1,46 @@
+
<%= error_messages_for 'message' %>
<% replying ||= false %>
-
- <% unless replying %>
-
<%= l(:field_subject) %> *
- <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %>
-
- <% else %>
-
<%= l(:field_subject) %> *
- <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
-
- <% end %>
-
-<% unless replying %>
- <% if @message.safe_attribute? 'sticky' %>
- <%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
- <% end %>
- <% if @message.safe_attribute? 'locked' %>
- <%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
- <% end %>
-<% end %>
-
-
<%= l(:field_description) %> *
-
- <%= text_area :quote,:quote,:style => 'display:none' %>
-
-
-<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
-<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
+
+ <% unless replying %>
+
<%= l(:field_subject) %> *
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %>
+
+ <% else %>
+
<%= l(:field_subject) %> *
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
+
+ <% end %>
+
+ <% unless replying %>
+ <% if @message.safe_attribute? 'sticky' %>
+ <%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
+ <% end %>
+ <% if @message.safe_attribute? 'locked' %>
+ <%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
+ <% end %>
+ <% end %>
+
+
+ <%= l(:field_description) %>
+ *
+
+ <%= text_area :quote,:quote,:style => 'display:none' %>
+
+
+ <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
+ <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
+
-
+
-
<%= l(:label_attachment_plural) %>
-<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
+
+ <%= l(:label_attachment_plural) %>
+
+ <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
+
diff --git a/app/views/welcome/_more_course.html.erb b/app/views/welcome/_more_course.html.erb
index 54d8ec6ef..c871e7f97 100644
--- a/app/views/welcome/_more_course.html.erb
+++ b/app/views/welcome/_more_course.html.erb
@@ -5,4 +5,4 @@
<% end %>
<% end %>
-<%= link_to "更多>>", {:controller => 'courses', :action => 'index', :school_id => school_id} %>
\ No newline at end of file
+<%= link_to l(:label_more), {:controller => 'courses', :action => 'index', :school_id => school_id} %>
\ No newline at end of file
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index dbc2d8f1b..251ade0b3 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -161,7 +161,7 @@
<% end %>
<% end %>
- <%= link_to l(:label_more_information), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
+ <%= link_to l(:label_more), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index a94998639..f57bc97d7 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -75,7 +75,7 @@
-
新开课程
+ <%= l(:lable_hot_course)%>
<% if @school_id %>
<% school_course = find_miracle_course(10,7, @school_id) %>
<% else %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 2333ea674..3bd25ceef 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -231,9 +231,6 @@ zh:
mail_body_wiki_content_added: "'%{id}' wiki页面已由 %{author} 添加。"
mail_subject_wiki_content_updated: "'%{id}' wiki页面已更新。"
mail_body_wiki_content_updated: "'%{id}' wiki页面已由 %{author} 更新。"
-
-
-
field_name: 名称
#added by huang
field_tea_name: 教师
@@ -2122,4 +2119,6 @@ zh:
label_my_school: 我的学校
label_all_schol: 全部学校
label_select_province: 请选择省份
- label_search_conditions_not_null: 搜索条件不能为空
\ No newline at end of file
+ label_search_conditions_not_null: 搜索条件不能为空
+
+ lable_hot_course: 活跃课程
\ No newline at end of file
From ed81275d17b0f605e540ddb88b0e45a414e4d3f1 Mon Sep 17 00:00:00 2001
From: z9hang
Date: Tue, 16 Sep 2014 10:50:49 +0800
Subject: [PATCH 12/29] =?UTF-8?q?#1256=EF=BC=8C=E7=BC=96=E8=BE=91=E5=B8=96?=
=?UTF-8?q?=E5=AD=90=E7=9A=84=E6=8C=89=E9=92=AE=E6=98=AF=E5=9B=BE=E6=A0=87?=
=?UTF-8?q?=E8=80=8C=E5=BC=95=E7=94=A8=E5=92=8C=E5=88=A0=E9=99=A4=E9=83=BD?=
=?UTF-8?q?=E6=98=AF=E6=96=87=E5=AD=97=EF=BC=8C=E5=B0=86=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E4=B9=9F=E6=94=B9=E4=B8=BA=E6=96=87=E5=AD=97=E4=BF=9D=E6=8C=81?=
=?UTF-8?q?=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/memos/show.html.erb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 9b68e80fc..577c3ff7f 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -23,7 +23,8 @@
)if !@memo.locked? && User.current.logged? %>
<%= link_to(
- image_tag('edit.png'),
+ #image_tag('edit.png'),
+ l(:button_edit),
{:action => 'edit', :id => @memo},
:method => 'get',
:title => l(:button_edit)
From 8530abf7694fab45c8b85203e8cfef113c7aa6cf Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 11:11:40 +0800
Subject: [PATCH 13/29] =?UTF-8?q?1.=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=202.=E4=BF=AE=E5=A4=8D=E8=BF=9B=E5=85=A5=E5=85=B6?=
=?UTF-8?q?=E4=BB=96=E4=BA=BA=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=E7=9A=84=E5=90=8D=E5=AD=97=E4=BB=8D?=
=?UTF-8?q?=E6=98=AF"=E6=88=91"=E7=9A=84BUG=20#1251=20=E8=A7=A3=E5=86=B3?=
=?UTF-8?q?=E6=96=B9=E6=A1=88=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AE=BF=E9=97=AE?=
=?UTF-8?q?=E7=94=A8=E6=88=B7ID=E5=92=8C=E5=BD=93=E5=89=8D=E7=99=BB?=
=?UTF-8?q?=E5=BD=95Id=E6=98=AF=E4=B8=8D=E6=98=AF=E4=B8=80=E8=87=B4?=
=?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/show.html.erb | 490 ++++++++++++++++++++++------------
1 file changed, 318 insertions(+), 172 deletions(-)
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 551f7e724..bc485325c 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,61 +1,72 @@
- <% if User.current.id == @user.id %>
-
+
+
- <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> :
+ <%= link_to l(:label_projects_score),"javascript:void(0)", :onclick => "show_div('project_score_index')"%> :
<%= format("%.2f" , project_scores(@project) ).to_i %>
- <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> :
+ <%= link_to l(:label_issue_score), "javascript:void(0)", :onclick => "show_div('issue_score_index')"%> :
<%= format("%.2f" , issue_score(@project)).to_i %>
- <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> :
+ <%= link_to l(:label_news_score), "javascript:void(0)", :onclick => "show_div('news_score_index')"%> :
<%= format("%.2f" , news_score(@project)).to_i %>
- <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> :
+ <%= link_to l(:label_file_score), "javascript:void(0)", :onclick => "show_div('file_score_index')"%> :
<%= format("%.2f" , documents_score(@project)).to_i %>
- <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> :
+ <%= link_to l(:label_code_submit_score), "javascript:void(0)", :onclick => "show_div('code_submit_score_index')" %> :
<%= format("%.2f" , changesets_score(@project)).to_i %>
- <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> :
+ <%= link_to l(:label_topic_score), "javascript:void(0)", :onclick => "show_div('projects_topic_score_index')"%> :
<%= format("%.2f" , board_message_score(@project)).to_i %>
- <%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %>
+ <%= render :partial => 'projects/project_score_index', :locals => {:project => @project } %>
\ No newline at end of file
diff --git a/app/views/projects/show_projects_score.js.erb b/app/views/projects/show_projects_score.js.erb
index 540db5395..bf84cbe73 100644
--- a/app/views/projects/show_projects_score.js.erb
+++ b/app/views/projects/show_projects_score.js.erb
@@ -1,5 +1,3 @@
-
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/show_projects_score') %>');
showModal('ajax-modal', '400px');
$('#ajax-modal').addClass('new-watcher');
-
\ No newline at end of file
From aabd18329923131908f7834d0478911fb16f4c6e Mon Sep 17 00:00:00 2001
From: linhk <304431313@.com>
Date: Tue, 16 Sep 2014 14:08:44 +0800
Subject: [PATCH 20/29] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E5=A7=93=E6=B0=8F=E6=96=87=E6=9C=AC=E6=A1=86=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/account_controller.rb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index d0f94b119..02163889b 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -110,6 +110,8 @@ class AccountController < ApplicationController
@cache_city = params[:city]||"" #城市
@cache_enterprise_name = params[:enterprise_name]||"" #企业
+ firstname_code = ""
+ lastname_code = ""
(redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
if request.get?
session[:auth_source_registration] = nil
@@ -119,6 +121,8 @@ class AccountController < ApplicationController
@user = User.new
@user.safe_attributes = user_params
if params[:identity] == "2" # 2 企业
+ firstname_code = @user.firstname
+ lastname_code = @user.lastname
@user.firstname = params[:enterprise_name]
@user.lastname = l(:field_enterprise)
end
@@ -141,10 +145,18 @@ class AccountController < ApplicationController
end
if(@cache_identityy == "")
+ if params[:identity] == "2"
+ @user.firstname = firstname_code
+ @user.lastname = lastname_code
+ end
flash.now[:error]= l(:label_identity)+l(:'activerecord.errors.messages.empty')
return
end
if(@cache_city == "")
+ if params[:identity] == "2"
+ @user.firstname = firstname_code
+ @user.lastname = lastname_code
+ end
flash.now[:error]= l(:label_location)+l(:'activerecord.errors.messages.empty')
return
end
@@ -174,6 +186,10 @@ class AccountController < ApplicationController
end
end
+ if params[:identity] == "2"
+ @user.firstname = firstname_code
+ @user.lastname = lastname_code
+ end
end
# Token based account activation
From e9a72b56cbb1b50b4dc86a836a546a8793b9f25f Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 14:15:52 +0800
Subject: [PATCH 21/29] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=91=98=E5=8F=AF=E4=BB=A5=E5=9C=A8=E4=BB=BB=E4=BD=95=E7=AB=9E?=
=?UTF-8?q?=E8=B5=9B=E5=8F=91=E5=B8=83=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/contestnotifications/index.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb
index 0cf722851..2a240eeca 100644
--- a/app/views/contestnotifications/index.html.erb
+++ b/app/views/contestnotifications/index.html.erb
@@ -2,7 +2,7 @@
<%= l(:label_notification) %>
-<% if User.current.logged? && User.current == @contest.author %>
+<% if User.current.logged? && (User.current.admin? ||User.current == @contest.author) %>
<%= link_to(l(:bale_news_notice),
new_contest_contestnotification_path(@contest),
:class => 'icon icon-add',
From 5ac7304858098f630c6cef8f106c5dec61093b12 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 14:23:13 +0800
Subject: [PATCH 22/29] =?UTF-8?q?=E4=BC=98=E5=8C=96view=E5=B1=82=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/contestnotifications/index.html.erb | 5 -----
1 file changed, 5 deletions(-)
diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb
index 2a240eeca..870c4cd4c 100644
--- a/app/views/contestnotifications/index.html.erb
+++ b/app/views/contestnotifications/index.html.erb
@@ -1,16 +1,12 @@
<%= l(:label_notification) %>
-
<% if User.current.logged? && (User.current.admin? ||User.current == @contest.author) %>
<%= link_to(l(:bale_news_notice),
new_contest_contestnotification_path(@contest),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-contestnotifications", "contestnotifications_title"); return false;') %>
<% end %>
-
-
-
<% if @contest %>
<%= labelled_form_for @contestnotification, :url => contest_contestnotifications_path(@contest),
@@ -31,7 +27,6 @@
<% else %>
<% @contestnotificationss.each do |contestnotifications| %>
-
<%= link_to image_tag(url_to_avatar(contestnotifications.author), :class => "avatar"), user_path(contestnotifications.author) %>
From 51a783c9a912c52ee1df752261071938f6a0d057 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 16 Sep 2014 15:38:21 +0800
Subject: [PATCH 23/29] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=202.?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9B=E9=A6=96=E9=A1=B5=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80=20=E8=A7=A3=E5=86=B3=E6=96=B9?=
=?UTF-8?q?=E6=A1=88=EF=BC=9A=E6=9F=A5=E6=89=BE=E7=B3=BB=E7=BB=9F=E4=B8=AD?=
=?UTF-8?q?=E6=9C=80=E6=96=B0=E7=9A=84=E6=9C=80=E5=A4=9A5=E6=9D=A1?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=EF=BC=8C=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=9C=A8=E9=A6=96=E9=A1=B5=EF=BC=8C=E7=94=A8=E6=88=B7=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E7=82=B9=E5=87=BB=E7=9B=B8=E5=BA=94=E5=85=AC=E5=91=8A?=
=?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=85=AC=E5=91=8A=E8=AF=A6=E7=BB=86=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/welcome_controller.rb | 2 +-
app/views/welcome/contest.html.erb | 26 +++++++++++++++-----------
config/locales/zh.yml | 2 +-
3 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index ca168ccb8..dee79bc31 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -110,7 +110,7 @@ class WelcomeController < ApplicationController
def contest
@contest_page = FirstPage.where("page_type = 'contest'").first
- @contest_notifications = ContestNotification.order("id desc")
+ @contest_notifications = Contestnotification.order("created_at desc").limit(5)
end
def search
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index 251ade0b3..b6fcdf8c9 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -166,14 +166,12 @@
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
-
<%= image_tag('/images/contest1.png')%>
-
- <%= link_to(contest.name, contest_contestnotifications_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
+ <%= link_to(contest.name.truncate(50, omission: '...'), contest_contestnotifications_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
(<%= link_to("#{contest.projects.where('is_public=1').count}"+l(:label_work_quantity), show_attendingcontest_contest_path(contest), :target => "_blank") %> )
<% else %>
@@ -186,29 +184,35 @@
-
<%=l(:label_release_time)%>: <%=format_time contest.created_on %>
-
<% end; reset_cycle %>
-
-
+
<%=l(:label_notification)%>
<% @contest_notifications.each do |notification| %>
-<%= link_to notification.title, notification %>
-<%= truncate(strip_tags(notification.content).gsub( ' ',' '), length:60) %>
-<%=l(:label_release_time)%>: <%=format_time notification.created_at %>
+
+ <%= link_to image_tag(url_to_avatar(notification.author), :class => "avatar"), user_path(notification.author) %>
+
+
+
+ <%= link_to_user(notification.author) %>
+ <%= l(:label_project_notice) %>
+ <%= link_to notification.title.truncate(35, omission: '...'), contest_contestnotifications_path(notification.contest_id) %>
+
+
+ <%= notification.description.truncate(30, omission: '...') %>
+ <%=l(:label_release_time)%>: <%=format_time notification.created_at %>
<% end %>
@@ -223,7 +227,7 @@
<%= link_to l(:label_more_information), forums_path %>
- <% find_new_forum_topics(8).each do |topic|%>
+ <% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 9bf050113..f71241223 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2073,7 +2073,7 @@ zh:
label_current_hot_contest: 最新热门竞赛
label_current_attendingcontest_work: 最新参赛作品
label_issue_feedback_activities: 问题和反馈动态
- label_more_information: 更多...
+ label_more_information: 更多>>
label_my_question: 我要提问
label_my_feedback: 我要反馈
label_release_time: 发布时间
From 245e0a858cac278938925242e6137cd637c1b8f4 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 17 Sep 2014 12:06:07 +0800
Subject: [PATCH 24/29] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?=
=?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=BF=9E=E6=8E=A5=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/contests/index.html.erb | 2 +-
app/views/welcome/contest.html.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb
index c166f73ab..2086bfe70 100644
--- a/app/views/contests/index.html.erb
+++ b/app/views/contests/index.html.erb
@@ -7,7 +7,7 @@
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
- <%= link_to(l(:label_newtype_contest), contest_new_contest_path, :class => 'icon icon-add', :target => "_blank") %>
+ <%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add', :target => "_blank") %>
<% end %>
<% end %>
diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb
index b6fcdf8c9..8165cfb0a 100644
--- a/app/views/welcome/contest.html.erb
+++ b/app/views/welcome/contest.html.erb
@@ -157,7 +157,7 @@
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
- <%= link_to(l(:label_newtype_contest), {:controller => 'bids', :action => 'new_contest'}, :class => 'icon icon-add') %>
+ <%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %>
<% end %>
<% end %>
From 98b6be61ba083000a7587096cf8d7695490ffb5f Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 17 Sep 2014 12:31:53 +0800
Subject: [PATCH 25/29] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=9B=9E=E5=A4=8D?=
=?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=BF=A1=E6=81=AF=E9=94=99=E8=AF=AF=E5=90=8E?=
=?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E4=B8=8D=E5=8F=8A=E6=97=B6?=
=?UTF-8?q?=E6=B8=85=E9=99=A4=E7=9A=84BUG=202.=E4=BF=AE=E5=A4=8D=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=96=B0=E5=BB=BA=E5=B8=96?=
=?UTF-8?q?=E5=AD=90=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2=E4=B8=BA=E5=9B=9E?=
=?UTF-8?q?=E5=A4=8D=E7=9A=84BUG=203.=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=90=8E=E6=8A=A5=E9=94=99=E7=9A=84BUg=20?=
=?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A=E8=B7=AF=E7=94=B1?=
=?UTF-8?q?=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/memos_controller.rb | 2 +-
app/views/messages/_form.html.erb | 64 ++++++++++++++---------------
config/routes.rb | 2 +-
3 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb
index 1e537ff75..aad575ee5 100644
--- a/app/controllers/memos_controller.rb
+++ b/app/controllers/memos_controller.rb
@@ -62,7 +62,7 @@ class MemosController < ApplicationController
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
format.json { render json: @memo, status: :created, location: @memo }
else
- flash[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
+ flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
# back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
pre_count = REPLIES_PER_PAGE
diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb
index 8dafdf173..0856da976 100644
--- a/app/views/messages/_form.html.erb
+++ b/app/views/messages/_form.html.erb
@@ -3,44 +3,44 @@
<% replying ||= false %>
-
- <% unless replying %>
-
- <%= f.text_field :subject, :size => 60, :style => "width: 99%;display:none;", :id => "message_subject" %>
-
- <% else %>
-
- <%= f.text_field :subject, :size => 60, :style => "width: 99%;display:none;", :id => "message_subject", :readonly => true %>
-
- <% end %>
-
- <% unless replying %>
- <% if @message.safe_attribute? 'sticky' %>
+
+ <% unless replying %>
+
<%= l(:field_subject) %> *
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %>
+
+ <% else %>
+
<%= l(:field_subject) %> *
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
+
+ <% end %>
+
+ <% unless replying %>
+ <% if @message.safe_attribute? 'sticky' %>
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
- <% end %>
- <% if @message.safe_attribute? 'locked' %>
+ <% end %>
+ <% if @message.safe_attribute? 'locked' %>
<%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
- <% end %>
+ <% end %>
<% end %>
-
-
- <%= l(:button_projects_feedback_respond) %>
+
+
+ <%= l(:field_description) %>
*
-
- <%= text_area :quote,:quote,:style => 'display:none' %>
-
-
- <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
- <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
-
+
+ <%= text_area :quote,:quote,:style => 'display:none' %>
+
+
+ <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
+ <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
+
-
+
-
- <%= l(:label_attachment_plural) %>
-
- <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
-
+
+ <%= l(:label_attachment_plural) %>
+
+ <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
+
diff --git a/config/routes.rb b/config/routes.rb
index be65d0eb4..a6b3c5421 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -724,7 +724,7 @@ RedmineApp::Application.routes.draw do
# added by young
match 'calls', :to => 'bids#index'
- match 'calls/:id', :to => 'bid#show', :as => 'respond'
+ match 'calls/:id', :to => 'bids#show', :as => 'respond'
# modified by longjun
# bids#contests is not exist
# match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403
From 5824f70fe34dcc618b053458c3cec96a4fbea87c Mon Sep 17 00:00:00 2001
From: linhk <304431313@.com>
Date: Wed, 17 Sep 2014 13:54:55 +0800
Subject: [PATCH 26/29] =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=97=A5=E5=BF=97?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/logger_helper.rb | 27 +++++++++++++++++++++++++++
config/environment.rb | 13 +++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 app/helpers/logger_helper.rb
diff --git a/app/helpers/logger_helper.rb b/app/helpers/logger_helper.rb
new file mode 100644
index 000000000..af04e38d3
--- /dev/null
+++ b/app/helpers/logger_helper.rb
@@ -0,0 +1,27 @@
+module LoggerHelper
+
+ #输出日志
+ def OutLogger
+ #日志输出级别
+ #Rails.logger.level = Logger::INFO
+
+ if(!File.exist?("database"))
+ Dir.mkdir("database")
+ end
+ if(!File.exist?("database/get"))
+ Dir.mkdir("database/get")
+ end
+ if(!File.exist?("database/sql"))
+ Dir.mkdir("database/sql")
+ end
+ if(!File.exist?("database/controller"))
+ Dir.mkdir("database/controller")
+ end
+
+ Rails.logger = Logger.new("database/get/#{Date.today.to_s}.log", "daily")
+ ActiveRecord::Base.logger = Logger.new("database/sql/#{Date.today.to_s}.log", "daily")
+ ActionController::Base.logger = Logger.new("database/controller/#{Date.today.to_s}.log", "daily")
+ end
+
+end
+
diff --git a/config/environment.rb b/config/environment.rb
index f44e25ae3..b105e8e25 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -13,3 +13,16 @@ end
# Initialize the rails application
RedmineApp::Application.initialize!
+
+#日志格式
+class Logger
+ def format_message(level, time, progname, msg)
+ "#{time.to_s(:db)} #{level} -- #{msg}\r\n"
+ end
+end
+
+#输出日志(database文件夹下get、sql、controller按照日期 分别输出路由信息、SQL语句、调用页面)[影响系统效率使用完请注释掉]
+#include LoggerHelper
+#LoggerHelper.OutLogger
+
+
From 0ab7bfcda979b8ff11b8c956e7a56689ba0a8eff Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 17 Sep 2014 14:14:17 +0800
Subject: [PATCH 27/29] =?UTF-8?q?=E9=99=90=E5=88=B6=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E3=80=81=E6=96=87=E4=BB=B6=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0=E9=95=BF=E5=BA=A6=20#1252?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 2 +-
app/views/attachments/_links.html.erb | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 38b97a501..b63f1071b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -127,7 +127,7 @@ module ApplicationHelper
# * :text - Link text (default to attachment filename)
# * :download - Force download (default: false)
def link_to_attachment(attachment, options={})
- text = h(truncate(options.delete(:text) || attachment.filename, length: 60, omission: '...'))
+ text = h(truncate(options.delete(:text) || attachment.filename, length: 25, omission: '...'))
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
html_options = options.slice!(:only_path)
url = send(route_method, attachment, attachment.filename, options)
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index 4c4065d09..2b12b21d1 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -11,7 +11,9 @@
:id => attachment,
:filename => attachment.filename%>
<% end %>
- <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
+
+ <%= h(truncate(" - #{attachment.description}", length: 20, omission: '...')) unless attachment.description.blank? %>
+
(<%= number_to_human_size attachment.filesize %>)
<% if options[:deletable] %>
<% if attachment.container_type == 'HomeworkAttach' %>
From 1976aa9c728c05eae9d88c7587c52744e950af94 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 17 Sep 2014 14:55:36 +0800
Subject: [PATCH 28/29] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B4=B4=E5=90=A7--?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E5=B8=96=E5=AD=90=EF=BC=8C=E2=80=9C=E7=BD=AE?=
=?UTF-8?q?=E9=A1=B6=E2=80=9D=E4=B8=8E=E2=80=9C=E5=BC=95=E7=94=A8=E2=80=9D?=
=?UTF-8?q?=E6=8E=A7=E4=BB=B6=E9=87=8D=E5=8F=A0=E5=8F=8A=E4=B8=AD=E8=8B=B1?=
=?UTF-8?q?=E6=96=87=E6=B7=B7=E6=8E=92=E9=97=AE=E9=A2=98=20#1258?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/memos/edit.html.erb | 3 +-
app/views/memos/show.html.erb | 9 ++-
app/views/stores/index.html.erb | 113 ++++++++++++++---------------
config/locales/zh.yml | 2 +-
public/stylesheets/application.css | 16 ++++
5 files changed, 79 insertions(+), 64 deletions(-)
diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb
index cf8770c8c..35543398f 100644
--- a/app/views/memos/edit.html.erb
+++ b/app/views/memos/edit.html.erb
@@ -27,8 +27,7 @@
<%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>
- <%= f.submit :value => l(:button_change) %>
+ <%= f.submit :value => l(:button_change) %> <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%>
<% end %>
-<%= link_to l(:button_back), back_url %>
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 577c3ff7f..5da3c5d63 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -43,11 +43,14 @@
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if @memo.destroyable_by?(User.current) %>
-
-
- <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
+
+
+
+ <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
+
<%= textAreailizable(@memo,:content) %>
diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb
index 5df6ecca8..47ea32b91 100644
--- a/app/views/stores/index.html.erb
+++ b/app/views/stores/index.html.erb
@@ -1,71 +1,68 @@
<% content_for :top_field do%>
- <%= render 'search_bar' %>
+ <%= render 'search_bar' %>
<% end %>
-
-<% @attach_array.each do |k|%>
-
-
- <%= @str_arr.shift %>
-
+
+ <% @attach_array.each do |k|%>
+
+
+ <%= @str_arr.shift %>
+
-
-
-
<%=l(:label_attachment)%>
-
<%=l(:field_downloads)%>
-
<%=l(:button_download)%>
-
-
+
+
+
<%=l(:label_attachment)%>
+
<%=l(:field_downloads)%>
+
<%=l(:button_download)%>
+
+
-
- <% k.each do |c1|%>
-
-
- <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
-
-
- <%= c1.downloads %>
-
-
- <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
-
-
- <% end -%>
-
+
+ <% k.each do |c1|%>
+
+
+ <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
+
+
+ <%= c1.downloads %>
+
+
+ <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
+
+
+ <% end -%>
+
-
-<% end; reset_cycle %>
+
+ <% end; reset_cycle %>
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index f71241223..fa8cf91f9 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1936,7 +1936,7 @@ zh:
label_forum_edit: 编辑讨论区
label_memo_create: 发布
label_memo_new: 新建主题
- label_memo_edit: 修改主题label_board_new
+ label_memo_edit: 修改主题
label_memo_new_from_forum: 发布帖子
label_forum: 公共贴吧
label_forum_new: 新建贴吧
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 72b379585..1fda63f93 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -2794,3 +2794,19 @@ div.repos_explain{
padding-top: 20px;
padding-bottom: 20px;
}
+
+.button-canel{
+ padding-bottom: 5px;
+ width: auto;
+ height: 25px;
+ font-family: '微软雅黑',Arial,Helvetica,sans-serif;
+ font-size: 12px;
+ color: #ffffff;
+ padding: 3px 9px;
+ background: #15bccf;
+ border-radius: 4px;
+ border: 1px solid #15bccf;
+ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
+ text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);
+ cursor: pointer;
+}
From 0a02fbf10ea8c412a9331dec0c5d9bebeabbc3a2 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 17 Sep 2014 15:04:41 +0800
Subject: [PATCH 29/29] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B5=84=E6=BA=90?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=EF=BC=8C=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=20#1262=20=E9=93=BE?=
=?UTF-8?q?=E6=8E=A5=E8=A7=A3=E6=9E=90=E6=96=B9=E6=B3=95=E4=B8=8D=E5=AF=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 14 ++-
app/views/attachments/_app_link.html.erb | 6 +-
app/views/attachments/_links.html.erb | 2 +-
app/views/homework_attach/_app_link.html.erb | 6 +-
app/views/stores/index.html.erb | 113 ++++++++++---------
5 files changed, 80 insertions(+), 61 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b63f1071b..f976918d8 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -126,7 +126,7 @@ module ApplicationHelper
# Options:
# * :text - Link text (default to attachment filename)
# * :download - Force download (default: false)
- def link_to_attachment(attachment, options={})
+ def link_to_short_attachment(attachment, options={})
text = h(truncate(options.delete(:text) || attachment.filename, length: 25, omission: '...'))
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
html_options = options.slice!(:only_path)
@@ -134,6 +134,18 @@ module ApplicationHelper
link_to text, url, html_options
end
+ # Generates a link to an attachment.
+ # Options:
+ # * :text - Link text (default to attachment filename)
+ # * :download - Force download (default: false)
+ def link_to_attachment(attachment, options={})
+ text = options.delete(:text) || attachment.filename
+ route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
+ html_options = options.slice!(:only_path)
+ url = send(route_method, attachment, attachment.filename, options)
+ link_to text, url, html_options
+ end
+
def link_to_attachment_img(attachment, options={})
text = options.delete(:text) || attachment.filename
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
diff --git a/app/views/attachments/_app_link.html.erb b/app/views/attachments/_app_link.html.erb
index 6934b76e1..263f51dc8 100644
--- a/app/views/attachments/_app_link.html.erb
+++ b/app/views/attachments/_app_link.html.erb
@@ -3,13 +3,15 @@
<% if attachments.count > 1 && attachment != attachments.first%>
<% end %>
- <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
+ <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments', :action => 'show',
:id => attachment, :filename => attachment.filename %>
<% end %>
- <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
+
+ <%= h(truncate(" - #{attachment.description}", length: 20, omission: '...')) unless attachment.description.blank? %>
+
(<%= number_to_human_size attachment.filesize %>)
<% end -%>
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index 2b12b21d1..de43dce4c 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -2,7 +2,7 @@
<% for attachment in attachments %>
- <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
+ <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
diff --git a/app/views/homework_attach/_app_link.html.erb b/app/views/homework_attach/_app_link.html.erb
index 48f116ce6..3aba96d27 100644
--- a/app/views/homework_attach/_app_link.html.erb
+++ b/app/views/homework_attach/_app_link.html.erb
@@ -2,12 +2,14 @@
<% if attachments.count > 1 && attachment != attachments.first%>
<% end %>
- <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
+ <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments', :action => 'show',
:id => attachment, :filename => attachment.filename %>
<% end %>
- <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
+
+ <%= h(truncate(" - #{attachment.description}", length: 20, omission: '...')) unless attachment.description.blank? %>
+
(<%= number_to_human_size attachment.filesize %>)
<% end -%>
diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb
index 47ea32b91..5df6ecca8 100644
--- a/app/views/stores/index.html.erb
+++ b/app/views/stores/index.html.erb
@@ -1,68 +1,71 @@
<% content_for :top_field do%>
- <%= render 'search_bar' %>
+ <%= render 'search_bar' %>
<% end %>
-
- <% @attach_array.each do |k|%>
-
-
- <%= @str_arr.shift %>
-
+
+<% @attach_array.each do |k|%>
+
+
+ <%= @str_arr.shift %>
+
-
-
-
<%=l(:label_attachment)%>
-
<%=l(:field_downloads)%>
-
<%=l(:button_download)%>
-
-
+
+
+
<%=l(:label_attachment)%>
+
<%=l(:field_downloads)%>
+
<%=l(:button_download)%>
+
+
-
- <% k.each do |c1|%>
-
-
- <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
-
-
- <%= c1.downloads %>
-
-
- <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
-
-
- <% end -%>
-
+
+ <% k.each do |c1|%>
+
+
+ <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
+
+
+ <%= c1.downloads %>
+
+
+ <%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
+
+
+ <% end -%>
+
-
- <% end; reset_cycle %>
+
+<% end; reset_cycle %>
\ No newline at end of file