From 95ed1880b548c9277e66421fac4a307e7fe67359 Mon Sep 17 00:00:00 2001 From: xianbo Date: Thu, 2 Jan 2014 09:11:38 +0800 Subject: [PATCH 1/8] fix setting about migrate path --- .gitignore | 3 ++- config/configuration.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7f93ebb9c..d6b5ecb82 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,9 @@ /log/* /test/* /tmp/* - +.gitignore /config/database.yml /public/images/avatars/* /Gemfile /Gemfile.lock +/db/schema.da diff --git a/config/configuration.yml b/config/configuration.yml index 3a14fa5d7..e7138b587 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -173,7 +173,7 @@ default: # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to # the ImageMagick's `convert` binary. Used to generate attachment thumbnails. - imagemagick_convert_command: '/opt/redmine-2.3.1-1/common/bin/convert' + imagemagick_convert_command: '/home/pdl/redmine-2.3.1-1/common/bin/convert' # Configuration of RMagcik font. # From 4abea36f3b3b38c0b3c86486d813f357c8617b1c Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 3 Jan 2014 08:53:09 +0800 Subject: [PATCH 2/8] remove label_leave_me_message from user show erb --- app/views/words/_message.html.erb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index 0f3fe64fe..7c7ae4acd 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -43,11 +43,6 @@ function checkMaxLength() { <%= image_tag(url_to_avatar(journal.user), :class => "avatar") %> <%= link_to journal.user, user_path(journal.user)%> - <% if @user == User.current %> - <%= l(:label_leave_me_message) %> : - <% else %> - <%= l(:label_leave_others_message) %> : - <% end %>

<%= textilizable journal.notes%>

From d0908c9132190d16f133f1f50dae5c03fc842271 Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Fri, 3 Jan 2014 10:29:29 +0800 Subject: [PATCH 3/8] front page --- app/views/welcome/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 85cd06eef..a0249918b 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,4 +1,4 @@ -
+

<%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %> @@ -76,7 +76,7 @@ } $(function(){ - $("a").attr("target", "_blank"); + $("#main").find("a").attr("target", "_blank"); }); function showInfo(id, content) { From d114c6abed5f8ad27dbfecee767f424ed8a0e6a9 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 3 Jan 2014 10:33:06 +0800 Subject: [PATCH 4/8] add remark to words_controller --- app/controllers/words_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 1e23197e7..be1e31776 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -42,6 +42,14 @@ class WordsController < ApplicationController def create_reply + # 这里是创建回复所使用的方法,此方法只针对回复,每一个新的留言并不在此方法管理范围内。 + # 由于多个地方用到了留言,而之前的表设计也有jour_type/jour_id这类信息 + # 所以在方法 add_reply_adapter 中判断所有调用此方法的来源页面, + # 为了保证兼容以往所有的代码,保证以往的方法可以调用,在返回页面中都做了各式各样的判断。 + # 页面保证 render new_respond/journal_reply + # 修改 add_reply_adapter 中可以确保留言创建成功 + # 删除留言功能要调用destroy,也记得在destroy.js中修改 + # deny api. api useless parent_id = params[:reference_id] author_id = User.current.id From 61f0eef6f3761ea4975a23fe7677c9762acfccad Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 3 Jan 2014 11:27:16 +0800 Subject: [PATCH 5/8] words/new reply insteads of project new reply form --- app/views/projects/feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/feedback.html.erb b/app/views/projects/feedback.html.erb index bdbcfd070..7e1c4077c 100644 --- a/app/views/projects/feedback.html.erb +++ b/app/views/projects/feedback.html.erb @@ -70,7 +70,7 @@ function checkMaxLength() {

- <%= render :partial => 'new_respond', :locals => {:journal => journal, :m_reply_id => journal} %> + <%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
From 4c0acc5f3e95b31bf6679350336e73394d5a88d7 Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 3 Jan 2014 21:02:30 +0800 Subject: [PATCH 6/8] welcome css --- app/views/layouts/_base_header.html.erb | 2 -- app/views/welcome/index.html.erb | 12 ++++++------ public/images/qrweixin.jpg | Bin 0 -> 24884 bytes public/stylesheets/application.css | 11 ++++++++--- public/stylesheets/welcome.css | 11 ++++++++++- 5 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 public/images/qrweixin.jpg diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index a2f0cde18..df0a3c052 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -9,5 +9,3 @@ <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%>
-
- diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index a0249918b..315c39c76 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,12 +1,11 @@ -
-
-

+

+ <%= image_tag '/images/qrweixin.jpg', size: '200x200', alt: 'trustie', class: "weixin" %> +
<%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %> -

-
+
<%= call_hook :view_account_login_top %> -
+
<%= form_tag(signin_path) do %> <%= back_url_hidden_field_tag if is_logout? %> <% unless User.current.logged? %> @@ -67,6 +66,7 @@
+