-
<%=h @project_to_destroy %>
-<%=l(:text_project_destroy_confirmation)%>
-
-<% if @project_to_destroy.descendants.any? %>
- <%= l(:text_subprojects_destroy_warning,
- content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
-<% end %>
-
-
- <%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
- <%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %>
- <%= submit_tag l(:button_delete) %>
- <% end %>
-
+
+
<%=l(:label_confirmation)%>
+
+
+
<%=h @project_to_destroy %>
+ <%=l(:text_project_destroy_confirmation)%>
+
+ <% if @project_to_destroy.descendants.any? %>
+ <%= l(:text_subprojects_destroy_warning,
+ content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
+ <% end %>
+
+
+ <%= form_tag(project_path(@project_to_destroy), :method => :delete) do %>
+ <%= check_box_tag 'confirm', 1, checked = true %> <%= l(:general_text_Yes) %>
+ <%= submit_tag l(:button_delete) %>
+ <% end %>
+
From d8a4e4d710582f0764558a4cbd15ba384f573346 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 11:33:52 +0800
Subject: [PATCH 03/32] =?UTF-8?q?issue=E5=BA=8F=E5=8F=B7=E4=B8=A2=E5=A4=B1?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20issue=E7=BC=A9=E8=BF=9B=E4=BB=A5?=
=?UTF-8?q?=E5=8F=8A=E4=BB=A3=E7=A0=81=E7=BC=A9=E8=BF=9B=E7=9A=84=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=B8=8D=E5=90=8C=20=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/schema.rb | 16 +++++++++++-----
public/stylesheets/prettify.css | 3 +++
public/stylesheets/project.css | 1 +
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/db/schema.rb b/db/schema.rb
index 6edcdcc42..abc7017e6 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 => 20150930011457) do
+ActiveRecord::Schema.define(:version => 20150917022239) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -575,8 +575,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
t.integer "viewed"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.string "secret_key"
- t.integer "status"
end
create_table "forums", :force => true do |t|
@@ -785,6 +783,16 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
+ create_table "journal_details_copy", :force => true do |t|
+ t.integer "journal_id", :default => 0, :null => false
+ t.string "property", :limit => 30, :default => "", :null => false
+ t.string "prop_key", :limit => 30, :default => "", :null => false
+ t.text "old_value"
+ t.text "value"
+ end
+
+ add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
+
create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id"
t.integer "user_id"
@@ -903,7 +911,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
t.datetime "updated_on", :null => false
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
- t.integer "reply_id"
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@@ -1369,7 +1376,6 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "description"
- t.string "subject"
end
create_table "taggings", :force => true do |t|
diff --git a/public/stylesheets/prettify.css b/public/stylesheets/prettify.css
index 489f1959b..4ae3a5e0d 100644
--- a/public/stylesheets/prettify.css
+++ b/public/stylesheets/prettify.css
@@ -48,6 +48,9 @@ ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px
list-style-type: decimal;
margin-left: 10px !important;
}
+.linenums li {
+ margin-left: 0px !important;
+}
li.L0,
li.L1,
li.L2,
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index fb6da363a..f769ff9e6 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -221,6 +221,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
.mt0{ margin-top:0px;}
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
+.issue_desc li{list-style-type: decimal;margin-left: 20px;}
.talk_info img {max-width:100%;}
a.talk_edit{ color:#426e9a; margin-right:5px;}
a:hover.talk_edit{ color:#ff5722;}
From 0cd96f579e87a942193b41d658cdd03f244c0291 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 11:34:12 +0800
Subject: [PATCH 04/32] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9tag?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/show.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 0eb779a23..76e178120 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -28,7 +28,7 @@
'action_menu' %>
<% if @issue.description? || @issue.attachments.any? -%>
-
+
<% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
From c8357a6364b40da04fac565b935d74725d6842ca Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 13:51:55 +0800
Subject: [PATCH 05/32] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9tag?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/index.html.erb | 1 +
public/javascripts/course.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 3825a9b09..ac0c50980 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -255,6 +255,7 @@
isdb = false; //这是单击
node = document.elementFromPoint(e.clientX, e.clientY);
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
+ isdb = true; //
return;
}
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 6102801df..3818d447d 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -752,7 +752,7 @@ function search_tag_attachment(url,tag_name,q,course_id,sort)
//clearTimeout(clickFunction);
clickFunction = setTimeout(function() {
search_func()
- }, 200);
+ }, 500);
function search_func(){
if(isdb!= false ) return;
$.get(
From 7d04ce80d487a2f1f904811204fc1dc8189d5e14 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 13:56:17 +0800
Subject: [PATCH 06/32] =?UTF-8?q?=20tag=E4=B8=BA=E5=8F=AF=E4=BB=A5?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E7=9A=84=E6=97=B6=E5=80=99=20=E6=98=AF=20?=
=?UTF-8?q?=E6=89=8B=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/courses.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index c6e9b27d3..11d38eb58 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -722,7 +722,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px
.files_tag{ width:670px; min-height:22px;margin-bottom:10px;}/* overflow:hidden; */
/*padding:1px 10px 修改原因,padding会导致内部输入框和外边框有边距*/
a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
-span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; }
+span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px;cursor: pointer }
a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px;}/* padding:1px 10px;*/
/* 20150423作业评分*/
From 7cbee4cd5379ff6f5195374bb4439ed5e7c50048 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 14:11:54 +0800
Subject: [PATCH 07/32] =?UTF-8?q?=E7=BC=96=E8=BE=91tag=E6=9C=89=E6=97=B6?=
=?UTF-8?q?=E5=80=99=E4=B8=8D=E8=83=BD=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 0ffa334c2..4f1a343d5 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -246,7 +246,7 @@ class TagsController < ApplicationController
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
#看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
if @rename_tag
- @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
+ @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
@taggings.update_attributes({:tag_id=>@rename_tag.id})
else #如果不存在,那么就直接更新该tag名称为新的名称
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
From e76f9a169e88d5f888618ec8507fdb58cc754c5b Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 14:14:28 +0800
Subject: [PATCH 08/32] =?UTF-8?q?=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/index.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index ac0c50980..6b1fdb2e9 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -255,7 +255,7 @@
isdb = false; //这是单击
node = document.elementFromPoint(e.clientX, e.clientY);
if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
- isdb = true; //
+ isdb = true; //为了防止在编辑的时候又去单击其他tag去过滤。导致tag过滤不可用
return;
}
if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
From e054f8045cbb08aed61397404e9598e2272489ac Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 8 Oct 2015 14:23:32 +0800
Subject: [PATCH 09/32] =?UTF-8?q?=E5=8E=BB=E6=8E=89Git=E7=9A=84=E4=B8=AD?=
=?UTF-8?q?=E8=8B=B1=E6=96=87=E8=AF=B4=E6=98=8E=20=E6=96=B0=E7=9A=84?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E6=8C=87=E5=AE=9A=E5=85=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/git_usage_controller.rb | 12 -
app/views/git_usage/ch_usage.html.erb | 352 ------------------------
app/views/git_usage/en_usage.html.erb | 346 -----------------------
app/views/repositories/show.html.erb | 5 +-
config/routes.rb | 3 -
5 files changed, 1 insertion(+), 717 deletions(-)
delete mode 100644 app/controllers/git_usage_controller.rb
delete mode 100644 app/views/git_usage/ch_usage.html.erb
delete mode 100644 app/views/git_usage/en_usage.html.erb
diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb
deleted file mode 100644
index 56aaa56f1..000000000
--- a/app/controllers/git_usage_controller.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-#added by baiyu
-class GitUsageController < ApplicationController
- layout "new_base"
- def ch_usage
-
- end
-
- def en_usage
-
- end
-end
-#end
\ No newline at end of file
diff --git a/app/views/git_usage/ch_usage.html.erb b/app/views/git_usage/ch_usage.html.erb
deleted file mode 100644
index 330ab9b5e..000000000
--- a/app/views/git_usage/ch_usage.html.erb
+++ /dev/null
@@ -1,352 +0,0 @@
-
-
-
-
-
-
-
-无标题文档
-
-
-
-
-
-
-
-
- 我们将使用 git 这个分布式版本控制系统来提交代码,下面就来介绍一下代码的提交方法。
-
-
-
-
-
-
-
- 安装时,选择Checkout as-is, commit as-is,这样Git 就不会修改换行风格了. 其他用缺省设置即可。
-
-
-
-
-
- 这两个软件安装完成后, 就可以开始使用了。
-
-
-
-
-
- Step3:
- 在目录中右键单击TortoiseGit 再选Create Branch…就可以创建分支了。
-
-
-
-
-
- 2、配置
-
-
-
-
-
- 在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置
-
-
- Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到, 其中的name和email要和<%= Setting.host_name %>上的登陆名和邮箱保持一致
- ,方便代码贡献统计 )。
-
-
- 接着可以定制上下文菜单:
- 我们在Context Menu里勾选的是 Clone 、Sync 和Commit
- 在Set Extend Menu Item里勾选的是Import Svn Ignore 、Show Reflog 、Browse References 、Stash Apply 和Submodule Sync
-
-
-
-
-
-
-
- Step1:
- 创建版本库(两种途径)
- (a) 在文件夹中按右键, 选择Git Create repository here 就可以创建库了,在出现的窗口中, 不勾选选项, 直接按OK。
- 完成上述操作后,可以看到工作区中出现了隐藏目录 .git 。这个隐藏的 .git目录就是git版本库(repository)。
-
- (b) 从远程服务器上克隆一个已存在的版本库到本地:在目录中单击右键,选择Git Clone... 然后在URL里填入要clone的文件的地址。
-
-
-
-
-
-
-
- Step2:
- 添加文件和文件夹
- 在文件夹中按右键, 选Git Commit -> "master "… ,接着填写Message, 勾选Whole Project 选项, 这样Commit 的时候可以将整个项目的信息全部Commit 上去, 可以实现不需要打Tag 就能Checkout 出每次Commit 的内容.
- 比如:
- 在工作区添加file1.txt,commit以后接着修改file1.txt,再创建一个文件夹dir1, 并且放置一个file2.txt 在dir1 目
- 录中, 再次commit 时, 就可以将dir1 和file2.txt 一起加入了.
-
-
-
-
-
- Step3:
- 创建分支
- 在目录中单击右键,选择TortoiseGit 里的create Branch… 就可以创建分支了。
- 勾选Switch to new branch , 就可以跳转到建立好的分支上。
- 比如:
- 添加一个file3.txt 后, commit 修改。接着通过Switch/Checkout… .可以切换回master 分支。
-
-
-
-
-
- Step4:
- 看分支情况及修改log
- 在目录中单击右键,选择TortoiseGit 里的Show log , 可以看分支情况和修改log。 勾选All Branches 可以看到所有分支的情况.
- 在Message 列中, 绿色
- 的是分支 , 红色
- 的是当前工作分支 。
-
-
-
-
-
- Step5:
- 比较版本差异
- 通过按Shift , 可以选中两个版本, 接着再按鼠标右键, 选中Compare revisions , 就可以比较两个revision 了。
-
-
-
-
-
- Step6:
- 合并分支
- 首先切换到master 分支, 接着点击鼠标右键选择TortoiseGit 里的Merge ,就可以实现将分支合并到主版本。
-
-
-
-
-
- Step7:
- 其他操作
- (a) Stash
- Git 提供了一个暂存修改的功能, 称为Stash 。 在一些程序进行了修改, 但还不
- 想commit 成revision 时, 就可以将这些修改Stash 起来, 等到后面需要时再将它
- 们Pop 出来。
- (b) 忽略文件
- 一些编辑器在修改文件后会产生bak 文件, 一般不希望这些备份文件也加入
- 库中, 可以选中一个.bak 文件, 然后选择Add to ignore list 中的*.bak , 这样bak 文
- 件以后就不会被commit 了。
-
-
-
-
-
- Tips:
-
-
- 在碰到不熟悉的命令时,可以通过 git help 命令查看git的用户手册,命令如下:
-
-
-
-
- $git help <command>
-
-
-
-
-
-
-
- 1、安装
-
-
- 如果你用的是Linux,你可以用你的本地包管理系统(native package management system)来安装。
-
-
- $ yum install git-core
- 在redhat等系统下用yum
- $apt-get install git-core
- 在debian,ubuntu等系统下用apt-get
-
-
-
-
-
-
-
- 2、配置
-
-
- $git config --global user.name “your_name”
- $git config --global user.email “your_email”
- Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,
- 其中的name和email要和<%= Setting.host_name %>上的登陆名和密码保持一致
-,方便代码贡献统计 )。
-
-
-
-
-
-
-
-
- 3、代码提交方法
-
-
- cd file1
- $ git add file1
- $ git init
- $ git commit -a
- $ git remote add [name] [版本库里给的URL(去掉http)]
- $ git push [name] master
- 输入password后即可上传。
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/views/git_usage/en_usage.html.erb b/app/views/git_usage/en_usage.html.erb
deleted file mode 100644
index 237895d23..000000000
--- a/app/views/git_usage/en_usage.html.erb
+++ /dev/null
@@ -1,346 +0,0 @@
-
-
-
-
-
-
-无标题文档
-
-
-
-
-
-
-
-
- We will use git which is a distributed version control and source code management system to submit our code, here is the submission method.
-
-
-
-
-
-
-
-
-
-
- Step1:
-
-
- Download msysgit from http://code.google.com/p/msysgit , the version we have used is
- Git-1.7.4-preview20110204.exe.
-
-
- Please tick "Checkout as-is " and "commit as-is " options during installation so git does not modify the line feed style. Other options you can use the default settings.
-
-
-
-
-
- Step2:
- Download TortoiseGit from http://code.google.com/p/tortoisegit/ , the version we have used is
- Tortoisegit-1.6.5.0-32bit.msi.
- Please tick "TortoisePLink" option during installation.
- You can start using Git when you complete the installation.
-
-
-
-
-
- Step3:
- You can create a branch with method that right-click the "TortoiseGit" in the directory and check the "Create Branch… " option.
-
-
-
-
-
-
- Right-click on the desktop and select the "Settings" in the "TortoiseGit"
- User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository, the name and email must be the same with login name and email you registed in the <%= Setting.host_name %>
- ).
- Then you can customize the "Context Menu":
- Please check the "Clone ","Sync " and "Commit " options in the "Context Menu ",
- check the "Import Svn Ignore ", "Show Reflog ", "Browse References ", "Stash Apply " and "Submodule Sync " in the "Set Extend Menu Item ".
-
-
-
-
-
-
- Step1:
- Create a new repository by two ways, here we go
- (a) You can create a repository by right-click in the folder and select "Git Create repository here". Uncheck any options in the new window, instead of it please click "OK".
- After completed these operation, you can see there is a hidden directory ( .git ) in the workspace and this hidden directory is the git repository.
- (b) Clone a exist version from the remote server to local: right-click in the folder and select " Git Clone.." and fill in the URL where you had clone from.
-
-
-
-
-
- Step2:
- Add the new file and folder
- Right-click in the folder and select Git Commit -> "master "… , then fill in the "Message" and check the " Whole Project " option so that the whole information of the project can commit.
- For example:
- Create a new file in the workspace named "file1.txt", commit it, and then creat a new folder in the workspace named "dir1", after that create a new file again, but this file is in the folder dir1, named "file2.txt". After that select "Git Commit", then file1 and dir1 can be joined together.
-
-
-
-
-
- Step3:
- Create a new Branch
- You can create a new branch by right-click in the folder and select TortoiseGit -> " create Branch… ".
- You will switch to the new branch when you check "Switch to new branch" option.
- For example:
- Create a new file in the workspace named "file3.txt", commit it. And you can switch to the "master" by select the "Switch/Checkout..." in the "TortoiseGit".
-
-
-
-
-
- Step4:
- View and modify the log
- You can view the situation of the branch by right-click in the folder and select TortoiseGit -> " Show log ". Even you can also modify the log in it. And you can view all the branch's situation by check the " All Branches " option.
- In the "Message" colume, branch is
- green
- and the current branch is red
- .
-
-
-
-
-
- Step5:
- Compare the version
- You can select two version in the same time by press "shift", and you can compare the different between two version by right-click the " Compare revisions ".
-
-
-
-
-
- Step6:
- Merge the branch
- First, you should switch to the "master", then righr-click on it and select TortoiseGit -> "Merge " so that the branch can merge into the main version.
-
-
-
-
-
- Step7:
- Other operations
- (a) Stash
- Git provides a function named Stash to temporarily store the revised programs. When you revise some programs but still do not want to commit them, you can stash these revised programs and pop them if you need them then.
- (b) Ignore Files
- The editor will generate some .bak files after editing. If you do not want to add these .bak files to the repository you can select the ".bak" file and check the "*.bak " in the " Add to ignore list ". Then the .bak files will not be commited.
-
-
-
-
-
-
-
-
- Tips:
- You can read the user manual by enter " git help " command when you are confused, command as follows:
-
-
-
-
- $git help <command>
-
-
-
-
-
-
-
- 1.Installation
-
-
- If you are useing Linux, you can install git through native package management system.
- $ yum install git-core
- if you are using redhat, you should type "yum".
- $apt-get install git-core
- if you are using debian or ubuntu, you should type "apt-get".
-
-
-
-
-
-
-
- 2. Configuration
-
-
- $git config --global user.name “your_name”M
- $git config --global user.email “your_email”
- User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository,
- the name and email must be the same with login name and email you registed in the <%= Setting.host_name %>
-).
-
-
-
-
-
-
-
- 3. How to commit
-
-
- cd file1
- $ git add file1
- $ git init
- $ git commit -a
- $ git remote add [name] [The URL which we give you in our website(with out http)]
- $ git push [name] master
- The last step is enter your password.
-
-
-
-
-
- —— By Trustie Team
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 242b87a74..28a260178 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -76,10 +76,7 @@
<% end %>
-查看如何提交代码:
- <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
- <%= link_to('English', en_usage_path, :class => "c_blue") %>
-
+
点击查看如何提交代码
<% content_for :header_tags do %>
diff --git a/config/routes.rb b/config/routes.rb
index ca301d078..d6c36212a 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -257,9 +257,6 @@ RedmineApp::Application.routes.draw do
match 'welcome/contest', :via => :get
# end longjun
- #added by baiyu
- match 'git_usage/ch_usage', :via => :get, :as => 'ch_usage'
- match 'git_usage/en_usage', :via => :get, :as => 'en_usage'
#added by nie
match '/projects/search', :via => [:get, :post]
match '/users/search', :via => [:get, :post]
From 9291758ef4dd06da176b2c3b5b307aaf35f942f5 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 14:24:51 +0800
Subject: [PATCH 10/32] =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=88=B0tag?=
=?UTF-8?q?=E4=B8=8A=E5=8F=98=E6=89=8B=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_tag_yun.html.erb | 2 +-
app/views/tags/_tag_list.html.erb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 6d3ebdf68..159384c6e 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -4,7 +4,7 @@
<%= k%>×<%= v%>
<% else%>
- <%= k%>×<%= v%>
<% end%>
diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb
index 49c9b2351..bc4a5b54e 100644
--- a/app/views/tags/_tag_list.html.erb
+++ b/app/views/tags/_tag_list.html.erb
@@ -2,8 +2,8 @@
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
- <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
- <%= tag %>
+ <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+ <%= tag %>
<% case object_flag %>
<% when '10' %>
From 418e7e379d8bd0e3d8bcbf018102766e0dd568fd Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 14:33:58 +0800
Subject: [PATCH 11/32] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=AE=A4=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E7=A7=BB=E5=8A=A8=E5=85=89=E6=A0=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_tag_yun.html.erb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 159384c6e..59b25c035 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -1,7 +1,8 @@
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
<% if tag_name && tag_name == k%>
- <%= k%>×<%= v%>
+
+ <%= k%>×<%= v%>
<% else%>
Date: Thu, 8 Oct 2015 16:10:33 +0800
Subject: [PATCH 12/32] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E4=B8=8D=E6=B6=88=E5=A4=B1=20=E7=B3=BB=E7=BB=9F=E6=B6=88?=
=?UTF-8?q?=E6=81=AF=E5=92=8C=E6=99=AE=E9=80=9A=E6=B6=88=E6=81=AF=E4=B8=80?=
=?UTF-8?q?=E8=87=B4=EF=BC=8C=E6=8C=89=E7=85=A7=E6=97=B6=E9=97=B4=E6=8E=92?=
=?UTF-8?q?=E5=BA=8F=20=E5=BE=85=E4=BC=98=E5=8C=96=E7=82=B9=EF=BC=9A?=
=?UTF-8?q?=E6=95=B0=E7=BB=84=E6=8E=92=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 13 +++++---
app/models/system_message.rb | 11 +++++++
app/views/users/_user_message_system.html.erb | 30 +++++++++++++++++
app/views/users/user_messages.html.erb | 33 ++-----------------
4 files changed, 52 insertions(+), 35 deletions(-)
create mode 100644 app/views/users/_user_message_system.html.erb
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 73a26b52c..fc19836ce 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -112,10 +112,17 @@ class UsersController < ApplicationController
case params[:type]
when nil
@message_alls = []
- messages = MessageAll.where("user_id =?" ,@user).order("created_at desc")
+ system_message_types = MessageAll.where("message_type =?", "SystemMessage")
+ messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage")
messages.each do |message_all|
@message_alls << message_all.message
end
+ # 系统消息需要给每个人发送,之所以这样做,可以避免遍历系统所有用户
+ system_message_types.each do |system_message_type|
+ @message_alls << system_message_type.message
+ end
+ # 取出所有符合条件的按照创建时间排序
+ @message_alls = @message_alls.sort {|a,b| b.created_at <=> a.created_at}
when 'unviewed'
@message_alls = []
messages = MessageAll.where("user_id =?", @user).order("created_at desc")
@@ -187,12 +194,8 @@ class UsersController < ApplicationController
message_new_time.onclick_time = Time.now
message_new_time.save
else
- # 24小时内显示
- contrast_time = Time.now - 86400
message_time.update_attributes(:onclick_time => Time.now)
end
- # 24小时内显示系统消息
- @user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
end
# 消息设置为已读
diff --git a/app/models/system_message.rb b/app/models/system_message.rb
index 2a810e8b8..a05610da7 100644
--- a/app/models/system_message.rb
+++ b/app/models/system_message.rb
@@ -5,4 +5,15 @@ class SystemMessage < ActiveRecord::Base
validates :subject, presence: true
# validates :description, presence: true
validates_length_of :description, maximum: 10000
+
+ has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy
+
+ # 系统消息放置总消息列表
+ after_create :add_system_message
+
+ def add_system_message
+ if MessageAll.where("message_type = '#{self.class.to_s}' and message_id = '#{self.id}'").first.nil?
+ self.message_alls << MessageAll.new(:user_id => self.user_id)
+ end
+ end
end
diff --git a/app/views/users/_user_message_system.html.erb b/app/views/users/_user_message_system.html.erb
new file mode 100644
index 000000000..efbd5d76b
--- /dev/null
+++ b/app/views/users/_user_message_system.html.erb
@@ -0,0 +1,30 @@
+<% if ma.class == SystemMessage %>
+ <%# @user_system_messages.each do |usm| %>
+
+
+ <%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
+
+
+ Trustie平台 发布新消息:
+
+ 【系统消息】
+
+
+ <%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current),
+ :id => "content_link_#{ma.id}",
+ :onmouseover =>"message_titile_show($(this),event);",
+ :onmouseout => "message_titile_hide($(this));"
+ %>
+
+
+ <% unless ma.subject.blank? %>
+
标题: <%= ma.subject %>
+ <% end %>
+ <% if (!ma.description.blank?) || (!ma.content.blank?) %>
+
内容:
<%= ma.description.nil? ? ma.content.html_safe : ma.description.html_safe %>
+ <% end %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <%# end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index bd794438c..b3a09386e 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -41,40 +41,13 @@
<% end %>
<% end %>
- <%# 系统消息 %>
- <% if params[:type] != 'system_messages' %>
- <% @user_system_messages.each do |usm| %>
-
-
- <%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
-
-
- Trustie平台 发布新消息:
-
- 【系统消息】
-
- <%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
- :id => "content_link_#{usm.id}",
- :onmouseover =>"message_titile_show($(this),event);",
- :onmouseout => "message_titile_hide($(this));"
- %>
-
-
- <% unless usm.subject.blank? %>
-
标题: <%= usm.subject %>
- <% end %>
- <% if (!usm.description.blank?) || (!usm.content.blank?) %>
-
内容:
<%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %>
- <% end %>
-
- <%= time_tag(usm.created_at).html_safe %>
-
- <% end %>
- <% end %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
+ <%# 系统消息 %>
+ <%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
+
<%# 课程消息 %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
From 2aeebfe64569df0bae8e521895ca522f3d3b0a8f Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 8 Oct 2015 16:23:15 +0800
Subject: [PATCH 13/32] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E7=BB=84?=
=?UTF-8?q?=E6=8E=92=E5=BA=8F=20=E6=9C=89=E5=BA=8F=E6=8E=92=E5=BA=8F?=
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 fc19836ce..5dd23b54c 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -112,8 +112,8 @@ class UsersController < ApplicationController
case params[:type]
when nil
@message_alls = []
- system_message_types = MessageAll.where("message_type =?", "SystemMessage")
- messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage")
+ system_message_types = MessageAll.where("message_type =?", "SystemMessage").order("created_at desc")
+ messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage").order("created_at desc")
messages.each do |message_all|
@message_alls << message_all.message
end
From f5ff94d88812f2c3e924d2a11bbd28f60112ec96 Mon Sep 17 00:00:00 2001
From: Tim
Date: Thu, 8 Oct 2015 16:35:08 +0800
Subject: [PATCH 14/32] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E5=9B=BA?=
=?UTF-8?q?=E5=AE=9A=E5=AE=BD=E5=BA=A6=E3=80=81=E4=BD=9C=E5=93=81=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0margin=E3=80=81=E6=90=9C=E7=B4=A2=E6=A1=86=E6=96=87?=
=?UTF-8?q?=E5=AD=97=E5=B1=85=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/courses.css | 4 ++--
public/stylesheets/new_user.css | 7 ++++---
public/stylesheets/public.css | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 11d38eb58..73488ad18 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -904,7 +904,7 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
.w720{width:721px;}
.w709{width: 709px;}
.w701{width: 701px;}
-a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;}
@@ -941,7 +941,7 @@ a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repe
.icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
-.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
+.HomeWorkBox{ background:#f6f6f6; padding:10px;}
.c_grey{ color:#888888;}
.HomeWorkP{ width:690px; font-size:14px;}
.HomeWorkP p{background-color: transparent !important;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 8de891699..1d2116874 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -97,6 +97,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.mw20{ margin: 0 20px;}
.mt-20 {margin-top:-20px;}
.mt-4 {margin-top: -4px;}
+.mt0 {margin-top: 0px !important;}
.mt3{ margin-top:3px;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px !important;}
@@ -811,7 +812,7 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no
.postThemeWrap {width:655px; float:left;position: relative}
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px;}
.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
-a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;}
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
@@ -1038,7 +1039,7 @@ a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repe
.icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
-.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
+.HomeWorkBox{ background:#f6f6f6; padding:10px;}
.c_grey{ color:#888888;}
.HomeWorkP{ width:690px; font-size:14px;}
.HomeWorkP p{background-color: transparent !important;}
@@ -1256,7 +1257,7 @@ a:hover.tijiao{ background:#0f99a9;}
.system_message_style {line-height: 19.1px; max-width: 681px;overflow:hidden; work-wrap: break-word; word-break: break-all;}
.system_message_style img {max-width: 100%;}
/*20150906关联项目LB*/
-a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;}
a.SetUpIcon{background: url(../images/homepage_icon.png) 0px -453px no-repeat; width:20px; height:20px; display:block; color:#888888;}
a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-repeat; color:#3598db;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index eb9732754..e14fb48fe 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -447,7 +447,7 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;}
.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
-.navSearchTypeBox {width:368px; height:35px; line-height:35px; vertical-align:middle; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;}
+.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
From 2ceba291bf2b3975ed748f21ca9839f6ddd57351 Mon Sep 17 00:00:00 2001
From: Tim
Date: Thu, 8 Oct 2015 17:27:08 +0800
Subject: [PATCH 15/32] =?UTF-8?q?=E8=93=9D=E8=89=B2=E7=AE=AD=E5=A4=B4?=
=?UTF-8?q?=E6=9B=BF=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/images/course/arrow_up.jpg | Bin 18880 -> 19324 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/public/images/course/arrow_up.jpg b/public/images/course/arrow_up.jpg
index 6bf285a1955654745423c78830c9d17ba422f707..bbf348fe1554afda8d34f08a5580060d312659f5 100644
GIT binary patch
delta 1304
zcmX>wneopwMz;Sq{y!9$KauSouceitse++_m8r3niQ&YL%}o4~o68t$`RePIU(Gt0
zot^Fbv+SjtwP|sG=ih7fnjyzu?c7nmU4E_U)?XJgPo{q^dRxoQ|7_=cSLQ|ar+!xN
zpY!KG!)|A9ROd)g$?(
zx=a5tv!<$d{ZRd7@N;4OYt`SE@|Nt_TN`fwJ5oOB)7;tr8P5Oa`_J%~>&t(J2SLtF
z^3U1+Gwjx#{O;+024mg*)$(WmnVHqFzAP*Z
zARsQo7{$OWt?E8`j)087q^W-Gf?nxa>Md%25BLcOZ$2Rq!Mxc_M3&JRteSy|fd#CY
z3C!h!2!cqkr~#PI$_N4w5nZqd8v`Sd=Gp8gx|Erh2dtC_B*AYwNm2|Huo9BF10JwO
zBnK?RWC4u|CZV3myjn7wmuakF;xf9E9xXDn3)=ySsFT9Iy;(JxS5$c
zJ32aA7@8WmSr}V7nwT3}ZeFOfomqj9v6DCGi=esYqJH4yR|ao03t)-E$|XO!G&eP`
z#4#^9wYVg|sMt=yrYI%N$|*4&%F4;K13FJHB{Rj!z}UjT(9qn(z}(2d%)-#n!r9Qo
z)dlD(OE(vw^Gt2@L0W+tAZ7p=ldW|$>M@032D%!%y16A~hd=jUQy=_&{}SzA!QZM1{xi7$+WzU6{ge91vvtG22fq8){yqL<
zP5rf!UHtE#-~V^>pW%OokU#dXjO?v`)jwQ)Kls(W`GTik|M|-mQVPuam8buHKm6$V
zj9u~X*{}Xfzw-R`>O)gM{AW1nzxZ$e%4hcSSNFfnJ^sb~r_Emd_<#JbZ2mL6c&&N)
uKSNh>?)4w`d;T+2|7Y;6zfnKu^Iv;lc~ScBc=x{<{~0dblYe3V|0V!_KrBuG
delta 884
zcmew}jq$)_Mz;Sq{y!9`n#gvK*VM|;NWs9;%D~jh)NJC%W+uKbo68t$`RaS_JPw}S
z?_BG%+OFA#{r$~9Q`k~c6KvO29?*H}tQ^+h{h8izm;GM$jC3rFV4s>
zP%zdrV6brV^krdT00I8VCk12#QpF~oJmv8%X4MK&{^nWklAFH@L@*05e*!DvVqo|W
z2AkbQlo>Z~5?#Q|%LX=r2W*1CPqsiCv8p@D&mrQ75Top}ld_<`YOHQnvZgpInZE6#;*>1H`Y
zJI2j1#y`dC+qSOVx~4NZWq!m}b@`nwC4qlFRcM?pe7yJkrAMz!W$b4B+9Wss{e*y5
zQp>tc3bT#6XKOcc#jjYtT)EU;{$%`y`_HD$a7%i;rTxPecbyNjPQL2d-~V&}#T2_O
z_UHDe&ky`oKl|y7D>3g3??3y`@c+X5eF0B@xd%V>`gLr7#N)5;3Om33c>Cf%gIZcv
zCI9#RcXyp-zp7vV@jpZTzw$4^Z
Date: Thu, 8 Oct 2015 17:42:48 +0800
Subject: [PATCH 16/32] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9tag?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 7 ++++---
app/views/files/_tag_yun.html.erb | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 4f1a343d5..6b03cff1e 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -244,10 +244,11 @@ class TagsController < ApplicationController
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type) unless @taggable_id.blank?
@obj = get_object(@taggable_id,params[:taggableType]) unless @taggable_id.blank?
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
- #看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
+ #看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id,
if @rename_tag
- @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
- @taggings.update_attributes({:tag_id=>@rename_tag.id})
+ @taggings = ActsAsTaggableOn::Tagging.where(" `taggings`.`tag_id` = #{ @tag_id} AND `taggings`.`taggable_type` = 'Attachment' ")#find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
+ @taggings.each { |t| t.update_attributes({:tag_id=> @rename_tag.id}) if t.tag_id != @rename_tag.id }
+ ActsAsTaggableOn::Tag.find(@tag_id).update_attributes(:name=>@rename_tag_name)#并且将该tag改名
else #如果不存在,那么就直接更新该tag名称为新的名称
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
end
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 59b25c035..912d3b4f4 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -5,7 +5,7 @@
<%= k%>×<%= v%>
<% else%>
- <%= k%>×<%= v%>
<% end%>
From fce872a6a513a78eee063a2925db92e117f9c08b Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 8 Oct 2015 17:42:48 +0800
Subject: [PATCH 17/32] =?UTF-8?q?=E4=BC=98=E5=8C=96issue=E6=98=BE=E7=A4=BA?=
=?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/controllers/issues_controller.rb | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 2232602aa..923414583 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -113,12 +113,8 @@ class IssuesController < ApplicationController
def show
# 当前用户查看指派给他的缺陷消息,则设置消息为已读
- query = @issue.forge_messages
- query.each do |m|
- if m.user_id == User.current.id
- m.update_attribute(:viewed, true)
- end
- end
+ query = ForgeMessage.where("forge_message_type =? and user_id =? and forge_message_id =?", "Issue", User.current, @issue).first
+ query.update_attribute(:viewed, true) unless query.nil?
# 缺陷状态更新
query_journals = @issue.journals
query_journals.each do |query_journal|
From b51066694e24e9a1ebac373cd1080c3baff6fa8b Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 09:06:01 +0800
Subject: [PATCH 18/32] =?UTF-8?q?=E5=85=A8=E9=83=A8=20=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/files_controller.rb | 6 +++++-
app/views/files/_tag_yun.html.erb | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 0f8330afe..057d962c8 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -134,8 +134,12 @@ class FilesController < ApplicationController
if sort == ""
sort = "created_on DESC"
end
+ if keywords != "%%"
resultSet = Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' AND filename LIKE :like ", like: "%#{keywords}%").
reorder(sort)
+ else
+ resultSet = Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' "). reorder(sort)
+ end
#resultSet = Attachment.find_by_sql("SELECT `attachments`.* FROM `attachments` LEFT OUTER JOIN `homework_attaches` ON `attachments`.container_type = 'HomeworkAttach' AND `attachments`.container_id = `homework_attaches`.id LEFT OUTER JOIN `homework_for_courses` ON `homework_attaches`.bid_id = `homework_for_courses`.bid_id LEFT OUTER JOIN `homework_for_courses` AS H_C ON `attachments`.container_type = 'Bid' AND `attachments`.container_id = H_C.bid_id WHERE (`homework_for_courses`.course_id = 117 OR H_C.course_id = 117 OR (`attachments`.container_type = 'Course' AND `attachments`.container_id = 117)) AND `attachments`.filename LIKE '%#{keywords}%'").reorder("created_on DESC")
end
@@ -547,7 +551,7 @@ class FilesController < ApplicationController
q = "%#{@q.strip}%"
@result = find_course_attache q,@course,sort
@result = visable_attachemnts @result
- @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)}
+ @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank?
@searched_attach = paginateHelper @result,10
@tag_list = get_course_tag_list @course
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 912d3b4f4..f60a5fb9e 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -1,3 +1,7 @@
+
+ 全部
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
<% if tag_name && tag_name == k%>
From 8841b5221bda56fad45fb0d98fe7cfe799c15808 Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Fri, 9 Oct 2015 09:08:58 +0800
Subject: [PATCH 19/32] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 6 +++---
app/views/users/user_messages.html.erb | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 73a26b52c..54ab38bfd 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -128,13 +128,13 @@ class UsersController < ApplicationController
# when 'system_messages'
# @message_alls = SystemMessage.order("created_at desc").all
when 'apply'
- @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
+ @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject') and user_id =?", @user).order("created_at desc")
when 'homework'
@message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage') and user_id =?", @user).order("created_at desc")
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
- # when 'forge_message'
- # @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
+ when 'forge_message'
+ @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
when 'course_news'
# 课程通知包含发布的通知和回复的通知
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index bd794438c..7ce0cb9d9 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -5,7 +5,7 @@
<%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %>
<%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %>
- <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
+ <%= link_to "加入项目", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
<%# 课程相关消息 %>
<%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %>
<%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %>
@@ -17,7 +17,7 @@
<%# 项目相关消息 %>
<%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %>
-
+ <%= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %>
<%# 项目相关消息 %>
From 0ff58b763107414b121956d9bee85357004215b6 Mon Sep 17 00:00:00 2001
From: Tim
Date: Fri, 9 Oct 2015 09:41:36 +0800
Subject: [PATCH 20/32] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=B4=B4?=
=?UTF-8?q?=E5=90=A7=E5=9B=BE=E7=89=87=E6=BC=82=E7=A7=BB=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/new_user.css | 12 ++++++------
public/stylesheets/public.css | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 1d2116874..cf40389a1 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -803,17 +803,17 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
.postDetailReply { margin-top:28px; color:#888888; float:right;}
-a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left;}
-a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat;}
+a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;}
.postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;}
.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
.postThemeContainer {width:720px;}
.postThemeWrap {width:655px; float:left;position: relative}
-.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px;}
-.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
-a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888;}
-a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
+.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;}
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index e14fb48fe..dc2fecbba 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -445,9 +445,9 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; background-color:#ffffff;}
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;}
-.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
-a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
-.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;}
+.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
From fb5eae3ae2fd196750982c9397878f1ff35be7a0 Mon Sep 17 00:00:00 2001
From: Tim
Date: Fri, 9 Oct 2015 10:26:47 +0800
Subject: [PATCH 21/32] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E5=9B=BE?=
=?UTF-8?q?=E6=A0=87=E6=BC=82=E7=A7=BB=E6=95=88=E6=9E=9C=E6=B8=85=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/new_user.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index cf40389a1..5d31c3984 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -447,8 +447,8 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
/*.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}*/
/*.resourcesUploadBox:hover {background-color:#0781b4;}*/
/* 个人主页右边部分*/
-.homepageSearchIcon {width:30px; height:32px; background:url(images/nav_icon.png) -8px 3px no-repeat; float:left;}
-input.homepageSearchIcon:hover {cursor: pointer;background:url(../images/nav_icon.png) -49px 3px no-repeat;}
+.homepageSearchIcon {width:30px; height:32px; background:url(images/nav_icon.png) -8px 3px no-repeat; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+input.homepageSearchIcon:hover {cursor: pointer;background:url(../images/nav_icon.png) -49px 3px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
a.homepagePostTypeQuiz {background:url(images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
a.homepagePostTypeAssignment {background:url(images/homepage_icon.png) -93px -318px no-repeat; padding-left:23px;}
a.replyGrey {color:#888888; display:inline-block;}
From 654ebfca46969370664bedd9f1859a31c761efde Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 10:33:10 +0800
Subject: [PATCH 22/32] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=82=80=E8=AF=B7?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=A7=93=E3=80=81=E5=90=8D=E3=80=81?=
=?UTF-8?q?=E6=80=A7=E5=88=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/projects_controller.rb | 5 ++-
app/models/mailer.rb | 4 +-
app/services/users_service.rb | 7 +++-
.../projects/invite_members_by_mail.html.erb | 39 +++++++++++++++++++
config/locales/zh.yml | 6 ++-
public/stylesheets/project.css | 5 ++-
6 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 251c47d4c..a8a302045 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -382,7 +382,10 @@ class ProjectsController < ApplicationController
end
else
email = params[:mail]
- Mailer.send_invite_in_project(email, @project, User.current).deliver
+ first_name = params[:first_name]
+ last_name = params[:last_name]
+ gender = params[:gender]
+ Mailer.send_invite_in_project(email, @project, User.current, first_name, last_name, gender).deliver
@is_zhuce = false
flash[:notice] = l(:notice_email_sent, :value => email)
end
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 39e709beb..d797f1ce1 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -107,7 +107,7 @@ class Mailer < ActionMailer::Base
# author: alan
# 邀请未注册用户加入项目
# 功能: 在加入项目的同时自动注册用户
- def send_invite_in_project(email, project, invitor)
+ def send_invite_in_project(email, project, invitor, first_name, last_name, gender)
@email = email
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
@password = newpass(6)
@@ -116,7 +116,7 @@ class Mailer < ActionMailer::Base
login = login.sub(/%40/,'@')
us = UsersService.new
# 自动激活用户
- user = us.register_auto(login, email, @password)
+ user = us.register_auto(login, email, @password, first_name, last_name, gender)
InviteList.create(:user_id => user.id, :project_id => project.id, :mail =>email)
User.current = user unless User.current.nil?
@user = user
diff --git a/app/services/users_service.rb b/app/services/users_service.rb
index 7e8e775ed..236dbc731 100644
--- a/app/services/users_service.rb
+++ b/app/services/users_service.rb
@@ -47,12 +47,16 @@ class UsersService
end
# 自动注册功能 FOR:邮件邀请
- def register_auto(login,mail,password)
+ def register_auto(login, mail, password, first_name, last_name, gender)
+ mail_notification = "day"
@user = User.new
@user.admin = false
@user.register
@user.login = login
@user.mail = mail
+ @user.firstname = first_name
+ @user.lastname = last_name
+ @user.mail_notification = mail_notification
password_confirmation = password
should_confirmation_password = true
if !password.blank? && !password_confirmation.blank? && should_confirmation_password
@@ -65,6 +69,7 @@ class UsersService
@user = automatically_register_lock(@user)
if @user.id != nil
ue = @user.user_extensions ||= UserExtensions.new
+ ue.gender = gender
ue.user_id = @user.id
ue.save
end
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index 44c571422..a697b70a4 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -44,6 +44,36 @@
}
+ function verifyFirstName() {
+ var first_name = $.trim($('#first_name').val());
+ if(first_name.length > 30)
+ {
+ $("#valid_email").text("用户名字过长,最长为30个字符");
+ return false;
+ }
+ else
+ {
+ $("#valid_email").text("");
+ return true;
+ }
+
+ }
+
+ function verifyLastName() {
+ var last_name = $.trim($('#last_name').val());
+ if(last_name.length > 30)
+ {
+ $("#valid_email").text("用户姓氏过长,最长为30个字符");
+ return false;
+ }
+ else
+ {
+ $("#valid_email").text("");
+ return true;
+ }
+
+ }
+
function senderEmail(obj)
{
if(verifyAddress())
@@ -79,6 +109,15 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
+
+ <%= text_field_tag 'first_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+
+
+ <%= text_field_tag 'last_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+
+
+ 男 女
+
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 69288d933..195526712 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2024,7 +2024,11 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
- label_input_email: 请输入邮箱地址
+ label_input_email: 请输入邮箱地址(必填)
+ label_input_email_firstname: 请输入用户名字(非必填)
+ label_input_email_lastname: 请输入用户姓氏(非必填)
+ label_input_email_gender: 请输入用户性别
+
#api end
project_module_files: 资源库
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index f769ff9e6..0a78b399b 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -44,7 +44,10 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.box_main02{ width:390px; margin:15px auto;}
.box_h3{ color:#15bccf; font-size:16px;}
.box_p{ color:#404040; margin-bottom:5px;}
-.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:290px;}
+.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:200px;}
+.fb_item_first_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
+.fb_item_last_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
+.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:48px;margin-left: 10px;}
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
From c4c005a39b59bc8fc46638201b95ee047e7403c5 Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Fri, 9 Oct 2015 10:57:53 +0800
Subject: [PATCH 23/32] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E6=89=80=E6=9C=89=E6=B6=88=E6=81=AF=E7=9A=84=E6=8E=92=E5=BA=8F?=
=?UTF-8?q?=E7=AE=97=E6=B3=95=EF=BC=8C=E4=BD=BF=E7=94=A8=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93=E7=9A=84order?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 5dd23b54c..7d74c0053 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -112,17 +112,10 @@ class UsersController < ApplicationController
case params[:type]
when nil
@message_alls = []
- system_message_types = MessageAll.where("message_type =?", "SystemMessage").order("created_at desc")
- messages = MessageAll.where("user_id =? and message_type !=?" ,@user, "SystemMessage").order("created_at desc")
+ messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user, "SystemMessage", "SystemMessage").order("created_at desc")
messages.each do |message_all|
@message_alls << message_all.message
end
- # 系统消息需要给每个人发送,之所以这样做,可以避免遍历系统所有用户
- system_message_types.each do |system_message_type|
- @message_alls << system_message_type.message
- end
- # 取出所有符合条件的按照创建时间排序
- @message_alls = @message_alls.sort {|a,b| b.created_at <=> a.created_at}
when 'unviewed'
@message_alls = []
messages = MessageAll.where("user_id =?", @user).order("created_at desc")
From 97a6487eeb723f29762c41ec30212f83c940106f Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Fri, 9 Oct 2015 10:58:51 +0800
Subject: [PATCH 24/32] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=90=AF?=
=?UTF-8?q?=E5=8C=BF=E8=AF=84=E5=A4=B1=E8=B4=A5=E7=9A=84=E5=8E=9F=E5=9B=A0?=
=?UTF-8?q?=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_message_course.html.erb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index a95645571..fee28f761 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -191,8 +191,10 @@
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
- <%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败,作业详情如下:
+ <%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败,
+ 失败原因:提交作品的人数低于2人
+
作业详情如下:
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
From 530d101024199681b52ce0925649668ba1b602ed Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 11:25:21 +0800
Subject: [PATCH 25/32] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=82=80=E8=AF=B7--?=
=?UTF-8?q?=E5=A7=93=E5=90=8D=E3=80=81=E9=95=BF=E5=BA=A6JS=E9=AA=8C?=
=?UTF-8?q?=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../projects/invite_members_by_mail.html.erb | 38 +++++++++----------
config/locales/zh.yml | 4 +-
public/stylesheets/project.css | 2 +-
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index a697b70a4..32a124078 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -44,21 +44,6 @@
}
- function verifyFirstName() {
- var first_name = $.trim($('#first_name').val());
- if(first_name.length > 30)
- {
- $("#valid_email").text("用户名字过长,最长为30个字符");
- return false;
- }
- else
- {
- $("#valid_email").text("");
- return true;
- }
-
- }
-
function verifyLastName() {
var last_name = $.trim($('#last_name').val());
if(last_name.length > 30)
@@ -74,9 +59,24 @@
}
+ function verifyFirstName() {
+ var first_name = $.trim($('#first_name').val());
+ if(first_name.length > 30)
+ {
+ $("#valid_email").text("用户名字过长,最长为30个字符");
+ return false;
+ }
+ else
+ {
+ $("#valid_email").text("");
+ return true;
+ }
+
+ }
+
function senderEmail(obj)
{
- if(verifyAddress())
+ if(verifyAddress() && verifyFirstName() && verifyLastName() )
{
obj.parent().submit();
}
@@ -110,13 +110,13 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
- <%= text_field_tag 'first_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+ <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
- <%= text_field_tag 'last_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+ <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
- 男 女
+ 性别 男 女
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 195526712..5efe4a2cc 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2025,8 +2025,8 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
label_input_email: 请输入邮箱地址(必填)
- label_input_email_firstname: 请输入用户名字(非必填)
- label_input_email_lastname: 请输入用户姓氏(非必填)
+ label_input_email_firstname: 请输入用户名字(可选)
+ label_input_email_lastname: 请输入用户姓氏(可选)
label_input_email_gender: 请输入用户性别
#api end
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 0a78b399b..e044f9d51 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -47,7 +47,7 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:200px;}
.fb_item_first_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
.fb_item_last_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
-.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:48px;margin-left: 10px;}
+.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:58px;margin-left: 10px;}
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
From e6bb599a6c3a030fbd41256c49a18b6af51013bb Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 9 Oct 2015 11:34:39 +0800
Subject: [PATCH 26/32] =?UTF-8?q?TAG=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 6b03cff1e..c08f8a3e6 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -244,13 +244,16 @@ class TagsController < ApplicationController
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type) unless @taggable_id.blank?
@obj = get_object(@taggable_id,params[:taggableType]) unless @taggable_id.blank?
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
- #看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id,
- if @rename_tag
- @taggings = ActsAsTaggableOn::Tagging.where(" `taggings`.`tag_id` = #{ @tag_id} AND `taggings`.`taggable_type` = 'Attachment' ")#find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
- @taggings.each { |t| t.update_attributes({:tag_id=> @rename_tag.id}) if t.tag_id != @rename_tag.id }
- ActsAsTaggableOn::Tag.find(@tag_id).update_attributes(:name=>@rename_tag_name)#并且将该tag改名
- else #如果不存在,那么就直接更新该tag名称为新的名称
- (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
+ if @course_id
+ course = Course.find @course_id
+ course.attachments.each do |attachment|
+ taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,attachment.id,attachment.class)
+ if taggings
+ taggings.delete
+ attachment.tag_list.add(@rename_tag_name.split(","))
+ attachment.save
+ end
+ end
end
else
if(@rename_tag.nil?) #这次命名的是新的tag
From dc3cb3a26b2862afe80d1de4e394b3988a734e52 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 13:38:35 +0800
Subject: [PATCH 27/32] =?UTF-8?q?=5Flogined=5Fheader.html=E5=A4=B4?=
=?UTF-8?q?=E5=83=8F=20=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5=E5=B0=B1?=
=?UTF-8?q?=E8=A6=81=E6=9C=89=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/_logined_header.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index d0cbc1f6b..fbbe40a93 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -112,7 +112,7 @@
$("#navHomepageSearchType").hide();
});
- $("#user_avatar img").mouseenter(function(){
+ $("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
From 829e94c56318b27f1d4b19980264ade17f57a3fd Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 9 Oct 2015 14:02:02 +0800
Subject: [PATCH 28/32] =?UTF-8?q?enter=E5=8F=AF=E4=BF=AE=E6=94=B9tag=20nam?=
=?UTF-8?q?e=E5=B9=B6=E4=B8=94=E5=8F=AA=E4=BF=AE=E6=94=B9=E4=B8=80?=
=?UTF-8?q?=E6=AC=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 14 +++---
app/views/files/index.html.erb | 77 ++++++++++++++++++++----------
2 files changed, 60 insertions(+), 31 deletions(-)
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index c08f8a3e6..cb61177f5 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -246,12 +246,14 @@ class TagsController < ApplicationController
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
if @course_id
course = Course.find @course_id
- course.attachments.each do |attachment|
- taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,attachment.id,attachment.class)
- if taggings
- taggings.delete
- attachment.tag_list.add(@rename_tag_name.split(","))
- attachment.save
+ if course
+ course.attachments.each do |attachment|
+ taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,attachment.id,attachment.class)
+ if taggings
+ taggings.delete
+ attachment.tag_list.add(@rename_tag_name.split(","))
+ attachment.save
+ end
end
end
end
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 6b1fdb2e9..656baaf63 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -246,36 +246,63 @@
tagId = id;
taggableType = type;
width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100
- domEle.html(' ');
+ domEle.html(' ');
domEle.parent().css("border","1px solid #ffffff");
$("#renameTagName").focus();
}
//监听所有的单击事件
- $(document.body).click(function(e){
- isdb = false; //这是单击
- node = document.elementFromPoint(e.clientX, e.clientY);
- if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
- isdb = true; //为了防止在编辑的时候又去单击其他tag去过滤。导致tag过滤不可用
- return;
- }
- if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
- if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
- ele.parent().css("border","");
- ele.parent().html(tagNameHtml);
+ $(function(){
+ $("#renameTagName").live("blur",function(){
+ updateTagName();
+ }).live("keypress",function(e){
+ if (e.keyCode == '13') {
+ updateTagName();
+ }
+ });
+ });
- }else{ //否则就要更新tag名称了
-// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问
- $.post(
- '<%= update_tag_name_path %>',
- {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
- )
-// }else{
-// ele.parent().css("border","");
-// ele.parent().html(tagNameHtml);
-// }
- }
- }
- });
+ //执行修改TAGName方法
+ function updateTagName(){
+ if(isdb){
+ isdb = false;
+ if($("#renameTagName").val() == tagName){ //如果值一样,则恢复原来的状态
+ ele.parent().css("border","");
+ ele.parent().html(tagNameHtml);
+
+ }
+ else{
+ $.post(
+ '<%= update_tag_name_path %>',
+ {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
+ );
+ }
+ }
+ }
+// $(document.body).click(function(e){
+// isdb = false; //这是单击
+// node = document.elementFromPoint(e.clientX, e.clientY);
+// if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
+// isdb = true; //为了防止在编辑的时候又去单击其他tag去过滤。导致tag过滤不可用
+// return;
+// }
+// if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态
+// if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态
+// ele.parent().css("border","");
+// ele.parent().html(tagNameHtml);
+//
+// }else{ //否则就要更新tag名称了
+//// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问
+// $.post(
+// '<%= update_tag_name_path %>',
+// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
+// )
+//// }else{
+//// ele.parent().css("border","");
+//// ele.parent().html(tagNameHtml);
+//// }
+// }
+// }
+// });
<%end %>
From 6a3312230a14e3ae64e3493583cc94743954908f Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 14:04:47 +0800
Subject: [PATCH 29/32] =?UTF-8?q?=E9=82=AE=E7=AE=B1=E9=AA=8C=E8=AF=81?=
=?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E4=B8=AD=E6=96=87=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=20=E5=A7=93=E5=90=8D=E5=85=81=E8=AE=B8=E4=B8=AD=E6=96=87?=
=?UTF-8?q?=E8=BE=93=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/projects/invite_members_by_mail.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index 32a124078..bced1e936 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -110,10 +110,10 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
- <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+ <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :onblur => "verifyLastName(this);" %>
- <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+ <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :onblur => "verifyFirstName(this);" %>
性别 男 女
From 357a5d4139f759a81b5e01605a4a92adaddc2f56 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 14:08:12 +0800
Subject: [PATCH 30/32] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=82=B9=E8=B5=9E?=
=?UTF-8?q?=E4=BA=BA=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/forums/_show_topics.html.erb | 1 +
public/stylesheets/new_user.css | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb
index d6e3f607b..bb8a91b69 100644
--- a/app/views/forums/_show_topics.html.erb
+++ b/app/views/forums/_show_topics.html.erb
@@ -21,6 +21,7 @@
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
+
<%= get_praise_num(topic)%>
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 5d31c3984..180e8b6ca 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -802,7 +802,8 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
-.postDetailReply { margin-top:28px; color:#888888; float:right;}
+.postDetailReply { margin-top:28px; color:#888888; float:right;display: inline}
+.disablePostLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; padding-right: 5px; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;}
From b04e20ed7d0fe500b2101fc104297b6b72379edd Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 14:25:40 +0800
Subject: [PATCH 31/32] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E8=81=9A?=
=?UTF-8?q?=E7=84=A6=E5=92=8C=E4=B8=8D=E8=81=9A=E7=84=A6=E7=9A=84=E6=97=B6?=
=?UTF-8?q?=E5=80=99=20=E7=9A=84=E9=9A=90=E8=97=8F=E5=92=8C=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lib/rails_kindeditor/helper.rb | 8 ++++++--
public/assets/kindeditor/kindeditor.js | 18 +++++++++++++-----
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
index f30ee2236..73924c835 100644
--- a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
+++ b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
@@ -9,7 +9,9 @@ module RailsKindeditor
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
+ afterFocus:'eval(function(){$(this.toolbar.div).show(); })',
+ afterBlur:'eval(function(){if(this.edit.html().trim() == "" ){$(this.toolbar.div).hide();}})'
)))
end
@@ -21,7 +23,9 @@ module RailsKindeditor
output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
+ afterFocus:' eval(function(){$(this.toolbar.div).show(); })',
+ afterBlur:'eval(function(){if(this.edit.html().trim() == ""){$(this.toolbar.div).hide();}})'
)))
end
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 448585376..3ad625604 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -3931,7 +3931,9 @@ _extend(KToolbar, KWidget, {
pdiv = $("#define",container);
}else if(!$("#full",container).is(':hidden')){
pdiv = $("#full",container);
- }
+ }else{ //都隐藏的情况下
+ pdiv = $("#define",container);
+ }
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
},
select : function(name) {
@@ -4728,13 +4730,19 @@ function _bindTabEvent() {
function _bindFocusEvent() {
var self = this;
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
- if (self.afterFocus) {
+ if(typeof self.afterFocus == 'string'){
+ self.afterFocus = eval(self.afterFocus);
+ }
+ if ( typeof self.afterFocus == 'function') {
self.afterFocus.call(self, e);
}
}).blur(function(e) {
- if (self.afterBlur) {
- self.afterBlur.call(self, e);
- }
+ if(typeof self.afterBlur == 'string'){
+ self.afterBlur = eval(self.afterBlur);
+ }
+ if ( typeof self.afterBlur == 'function') {
+ self.afterBlur.call(self, e);
+ }
});
}
function _removeBookmarkTag(html) {
From 5f8d21f1cb45de9f4f0ec8580d673d92663d84d3 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 14:26:27 +0800
Subject: [PATCH 32/32] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89=20?=
=?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E8=81=9A=E7=84=A6=E5=92=8C=E4=B8=8D?=
=?UTF-8?q?=E8=81=9A=E7=84=A6=E7=9A=84=E6=97=B6=E5=80=99=20=E7=9A=84?=
=?UTF-8?q?=E9=9A=90=E8=97=8F=E5=92=8C=E6=98=BE=E7=A4=BA=E6=8E=A7=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lib/rails_kindeditor/helper.rb | 8 ++------
public/assets/kindeditor/kindeditor.js | 18 +++++-------------
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
index 73924c835..f30ee2236 100644
--- a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
+++ b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
@@ -9,9 +9,7 @@ module RailsKindeditor
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
- afterFocus:'eval(function(){$(this.toolbar.div).show(); })',
- afterBlur:'eval(function(){if(this.edit.html().trim() == "" ){$(this.toolbar.div).hide();}})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
)))
end
@@ -23,9 +21,7 @@ module RailsKindeditor
output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
- afterFocus:' eval(function(){$(this.toolbar.div).show(); })',
- afterBlur:'eval(function(){if(this.edit.html().trim() == ""){$(this.toolbar.div).hide();}})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
)))
end
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 3ad625604..448585376 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -3931,9 +3931,7 @@ _extend(KToolbar, KWidget, {
pdiv = $("#define",container);
}else if(!$("#full",container).is(':hidden')){
pdiv = $("#full",container);
- }else{ //都隐藏的情况下
- pdiv = $("#define",container);
- }
+ }
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
},
select : function(name) {
@@ -4730,19 +4728,13 @@ function _bindTabEvent() {
function _bindFocusEvent() {
var self = this;
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
- if(typeof self.afterFocus == 'string'){
- self.afterFocus = eval(self.afterFocus);
- }
- if ( typeof self.afterFocus == 'function') {
+ if (self.afterFocus) {
self.afterFocus.call(self, e);
}
}).blur(function(e) {
- if(typeof self.afterBlur == 'string'){
- self.afterBlur = eval(self.afterBlur);
- }
- if ( typeof self.afterBlur == 'function') {
- self.afterBlur.call(self, e);
- }
+ if (self.afterBlur) {
+ self.afterBlur.call(self, e);
+ }
});
}
function _removeBookmarkTag(html) {