From ed27b6e30f2672e57a9fdd3d8de93e2dbf79e49a Mon Sep 17 00:00:00 2001
From: huang
Date: Mon, 27 Jul 2015 16:03:03 +0800
Subject: [PATCH 01/94] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8A=A0=E5=85=A5?=
=?UTF-8?q?=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5=E6=B7=BB=E5=8A=A0=E8=87=AA?=
=?UTF-8?q?=E5=8A=A8=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/mailer.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 5ae9df001..a25aff6bb 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -388,7 +388,8 @@ class Mailer < ActionMailer::Base
@user = applied.user
recipients = @project.manager_recipients
s = l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name)
- @applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members')
+ @token = Token.get_token_from_user(@user, 'autologin')
+ @applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members', :token => @token.value)
mail :to => recipients,
:subject => s
end
From 9beb8acb991ad24d34e686d92fa9f70202d2c03d Mon Sep 17 00:00:00 2001
From: huang
Date: Mon, 27 Jul 2015 16:49:21 +0800
Subject: [PATCH 02/94] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E5=8A=A8=E6=80=81=EF=BC=9A1=E3=80=81=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=87=A0=E6=9D=A1=E8=AE=B0=E5=BD=95=E5=90=8E=E4=B8=8D=E6=BB=A1?=
=?UTF-8?q?=E5=8D=81=E6=9D=A1=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=202=E3=80=81=E6=96=87=E6=A1=A3=E8=AE=B0=E5=BD=95=E4=B8=8D?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=98=BE=E7=A4=BA=E5=9C=A8=E5=8A=A8=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/projects_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 2efaf591a..d578fe586 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -280,11 +280,11 @@ class ProjectsController < ApplicationController
# 根据私密性,取出符合条件的所有数据
if User.current.member_of?(@project) || User.current.admin?
- @events_pages = ForgeActivity.where("project_id = ?",@project).order("created_at desc").page(params['page'|| 1]).per(20);
+ @events_pages = ForgeActivity.where("project_id = ? and forge_act_type != ?",@project, "Document" ).order("created_at desc").page(params['page'|| 1]).per(20);
#events = @activity.events(@date_from, @date_to)
else
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
- = ?",@project,1).order("created_at desc")
+ = ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc")
.page(params['page'|| 1]).per(10);
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
end
From 0f82bbf79739794b1ce160c06e00e875b7b0199c Mon Sep 17 00:00:00 2001
From: huang
Date: Mon, 27 Jul 2015 18:15:05 +0800
Subject: [PATCH 03/94] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8C=BF=E5=90=8D?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=9B=E5=BB=BA=E9=A1=B9=E7=9B=AE=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/projects_controller.rb | 18 +++++++++++++-----
app/views/projects/show.html.erb | 14 --------------
2 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index d578fe586..09ae5ad79 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -150,11 +150,15 @@ class ProjectsController < ApplicationController
end
def new
- @issue_custom_fields = IssueCustomField.sorted.all
- @trackers = Tracker.sorted.all
- @project = Project.new
- @project.safe_attributes = params[:project]
- render :layout => 'base'
+ if User.current.login?
+ @issue_custom_fields = IssueCustomField.sorted.all
+ @trackers = Tracker.sorted.all
+ @project = Project.new
+ @project.safe_attributes = params[:project]
+ render :layout => 'base'
+ else
+ redirect_to signin_url
+ end
end
def share
@@ -167,6 +171,10 @@ class ProjectsController < ApplicationController
end
def create
+ unless User.current.login?
+ redirect_to signin_url
+ return
+ end
@issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all
@project = Project.new
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index ca7bb6159..f1b3d9b7b 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -93,21 +93,7 @@
-
- <% elsif e.forge_act_type == "Document" %>
-
<% elsif e.forge_act_type == "Attachment" %>
From a37505db2e2317a455215892cb2224c783aef810 Mon Sep 17 00:00:00 2001
From: huang
Date: Tue, 28 Jul 2015 15:42:10 +0800
Subject: [PATCH 04/94] =?UTF-8?q?=E5=8E=BB=E6=8E=89wiki=E9=A1=B5=E9=9D=A2A?=
=?UTF-8?q?UTO=E3=80=81PDF=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/wiki/show.html.erb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index 28fab1243..c58f42dea 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -74,11 +74,11 @@
<% end %>
-<% other_formats_links do |f| %>
- <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
- <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
- <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
-<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
+<%# other_formats_links do |f| %>
+ <%#= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
+ <%#= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
+ <%#= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
+<%# end if User.current.allowed_to?(:export_wiki_pages, @project) %>
<% content_for :sidebar do %>
<%= render :partial => 'sidebar' %>
<% end %>
From 8ef0d0f8a6633bb0ab8e01948757ceb7d73fe173 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Tue, 28 Jul 2015 16:38:18 +0800
Subject: [PATCH 05/94] =?UTF-8?q?1=E3=80=81=E4=B8=AA=E4=BA=BA=E4=B8=BB?=
=?UTF-8?q?=E9=A1=B5=EF=BC=8C=E5=B8=83=E5=B1=80=E5=8F=B3=E4=BE=A7=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=A4=9F=E5=B7=A6=E4=BE=A7=E9=95=BF=E5=BA=A6?=
=?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E8=A1=A5=E5=85=85=202=E3=80=81?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5js=E3=80=81css=E6=8F=90?=
=?UTF-8?q?=E5=8F=96=E5=87=BA=E6=9D=A5=203=E3=80=81css=E9=94=99=E8=AF=AF?=
=?UTF-8?q?=E6=95=B4=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_users_new.html.erb | 2 +-
app/views/users/show.html.erb | 239 ----------------------
public/javascripts/user.js | 238 +++++++++++++++++++++
public/stylesheets/users.css | 14 +-
4 files changed, 250 insertions(+), 243 deletions(-)
create mode 100644 public/javascripts/user.js
diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb
index 683c7b0b5..632a8f66c 100644
--- a/app/views/layouts/base_users_new.html.erb
+++ b/app/views/layouts/base_users_new.html.erb
@@ -17,6 +17,7 @@
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
+<%= javascript_include_tag "user","avatars"%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
@@ -266,7 +267,6 @@
<%= render :partial => 'layouts/new_feedback' %>
-<%= javascript_include_tag '/javascripts/avatars.js' %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 3b1ee93c8..66482211c 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,12 +1,3 @@
-
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<% @center_flag = (User.current == @user) %>
<% if @center_flag %>
@@ -49,233 +40,3 @@
-
-
diff --git a/public/javascripts/user.js b/public/javascripts/user.js
new file mode 100644
index 000000000..7c7189066
--- /dev/null
+++ b/public/javascripts/user.js
@@ -0,0 +1,238 @@
+$(function(){
+ if($(".top_new").length==0){
+ $("#RSide").css("min-height",$("#LSide").height()-30);
+ }
+ else{
+ $("#RSide").css("min-height",$("#LSide").height()-87);
+ }
+
+});
+
+//个人动态
+$(function(){
+
+ function init_editor(params){
+ var editor = params.kindutil.create(params.textarea, {
+ resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
+ items:['emoticons'],
+ afterChange:function(){//按键事件
+ nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
+ },
+ afterCreate:function(){
+ var toolbar = $("div[class='ke-toolbar']",params.div_form);
+ $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
+ params.toolbar_container.append(toolbar);
+ }
+ }).loadPlugin('paste');
+ return editor;
+ }
+
+ function nh_check_field(params){
+ var result=true;
+ if(params.content!=undefined){
+ if(params.content.isEmpty()){
+ result=false;
+ }
+ if(params.content.html()!=params.textarea.html() || params.issubmit==true){
+ params.textarea.html(params.content.html());
+ params.content.sync();
+ if(params.content.isEmpty()){
+ params.contentmsg.html('内容不能为空');
+ params.contentmsg.css({color:'#ff0000'});
+ }else{
+ params.contentmsg.html('填写正确');
+ params.contentmsg.css({color:'#008000'});
+ }
+ params.contentmsg.show();
+ }
+ }
+ return result;
+ }
+ function init_form(params){
+ params.form.submit(function(){
+ var flag = false;
+ if(params.form.attr('data-remote') != undefined ){
+ flag = true
+ }
+ var is_checked = nh_check_field({
+ issubmit:true,
+ content:params.editor,
+ contentmsg:params.contentmsg,
+ textarea:params.textarea
+ });
+ if(is_checked){
+ if(flag){
+ return true;
+ }else{
+ $(this)[0].submit();
+ return false;
+ }
+ }
+ return false;
+ });
+ }
+ function nh_reset_form(params){
+ params.form[0].reset();
+ params.textarea.empty();
+ if(params.editor != undefined){
+ params.editor.html(params.textarea.html());
+ }
+ params.contentmsg.hide();
+ }
+
+ KindEditor.ready(function(K){
+ $("a[nhname='reply_btn']").live('click',function(){
+ var params = {};
+ params.kindutil = K;
+ params.container = $(this).parent('div');
+ params.div_form = $("div[nhname='div_form']",params.container);
+ params.form = $("form",params.div_form);
+ params.textarea = $("textarea[name='user_notes']",params.div_form);
+ params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
+ params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
+ params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
+ params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
+ if(params.textarea.data('init') == undefined){
+ params.editor = init_editor(params);
+ init_form(params);
+ params.cancel_btn.click(function(){
+ nh_reset_form(params);
+ toggleAndSettingWordsVal(params.div_form, params.textarea);
+ });
+ params.submit_btn.click(function(){
+ params.form.submit();
+ });
+ params.textarea.data('init',1);
+ }
+ params.cancel_btn.click();
+ setTimeout(function(){
+ if(!params.div_form.is(':hidden')){
+ params.textarea.show();
+ params.textarea.focus();
+ params.textarea.hide();
+ }
+ },300);
+
+ });
+
+ $("div[nhname='new_message']").each(function(){
+ var params = {};
+ params.kindutil = K;
+ params.div_form = $(this);
+ params.form = $("form",params.div_form);
+ if(params.form==undefined || params.form.length==0){
+ return;
+ }
+ params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
+ params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
+ params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
+ params.cancel_btn = $("#new_message_cancel_btn");
+ params.submit_btn = $("#new_message_submit_btn");
+
+ if(params.textarea.data('init') == undefined){
+ params.editor = init_editor(params);
+ init_form(params);
+ params.cancel_btn.click(function(){
+ nh_reset_form(params);
+ });
+ params.submit_btn.click(function(){
+ params.form.submit();
+ });
+ params.textarea.data('init',1);
+ $(this).show();
+ }
+ });
+ });
+});
+function init_list_more_div(params){
+ var p=params;
+ p.exbtn.click(function(){
+ var isclose = p.container.data('isclose');
+ var hasmore = p.container.data('hasmore');
+ if(isclose == '1'){
+ $("div[nhname='rec']",p.container).show();
+ p.container.data('isclose','0');
+ change_status_4_list_more_div(params);
+ return;
+ }
+ if(hasmore == '0'){
+ change_status_4_list_more_div(params,'get');
+ return;
+ }
+ var url = p.container.data('url');
+ if($("div[nhname='rec']",p.container).length > 0){
+ var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
+ url += "?lastid="+lastid;
+ var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
+ if(lasttime != undefined){
+ url += "&lasttime="+lasttime;
+ }
+ }
+ $.ajax( {url:url,dataType:'text',success:function(data){
+ var html = $(""+data+"
");
+ var lens = $("div[nhname='rec']",html).length;
+ if(lens < p.size){
+ p.container.data('hasmore','0');
+ }
+ if(lens>0){
+ var currpage = parseInt(p.container.data('currpage'))+1;
+ p.container.data('currpage',currpage);
+ p.container.append(html.html())
+ }
+ change_status_4_list_more_div(params,'get');
+ p.div.show();
+ }} );
+ });
+ p.clbtn.click(function(){
+ var i=0;
+ $("div[nhname='rec']",p.container).each(function(){
+ i++;
+ if(i> p.size){
+ $(this).hide();
+ }
+ });
+ p.container.data('isclose','1');
+ change_status_4_list_more_div(params);
+ });
+ p.exbtn.click();
+}
+function change_status_4_list_more_div(params,opt){
+ var p=params;
+ if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
+ p.exbtn.click();
+ return;
+ }
+ var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
+ if( show_lens > p.size ){
+ p.clbtn.show();
+ }else{
+ p.clbtn.hide();
+ }
+ if($("div[nhname='rec']",p.container).length == 0){
+ p.exbtn.html(p.nodatamsg);
+ }else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
+ p.exbtn.html('点击展开更多');
+ }else{
+ p.exbtn.html('没有更多了');
+ }
+}
+function init_list_more_div_params(div){
+ var params = {};
+ params.div = div;
+ params.container = $("div[nhname='container']",div);
+ params.exbtn = $("a[nhname='expand']",div);
+ params.clbtn = $("a[nhname='close']",div);
+ params.size = params.container.data('pagesize');
+ params.nodatamsg = params.container.data('nodatamsg');
+ if( params.size == undefined ){
+ params.size = 13;
+ }
+ return params;
+}
+$(function(){
+ $("div[nhname='list_more_div']").each(function(){
+ var params = init_list_more_div_params($(this));
+ init_list_more_div(params)
+ });
+});
+//个人动态 end
\ No newline at end of file
diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css
index 30e6594f5..7c3dad383 100644
--- a/public/stylesheets/users.css
+++ b/public/stylesheets/users.css
@@ -8,7 +8,7 @@
.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;}
.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; }
.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;}
-.pic_members{ background:url(../images/pic_users.jpg) 0 0 no-repeat; display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
+.pic_members{ display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
.pic_members:hover{border:1px solid #c9c9c9;}
/*新建*/
.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; }
@@ -89,7 +89,7 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;}
.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;}
.users_ctt input,.users_ctt textarea{ margin-left:2px;}
-.users_ctt textarea{ margin-bottom:none;}
+/*.users_ctt textarea{ margin-bottom:nor;}*/
.w450{ width:450px;}
.w210{ width:200px;}
.w70{ width:70px;}
@@ -124,4 +124,12 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;}
-a.hidepic>img{display:none;}
\ No newline at end of file
+a.hidepic>img{display:none;}
+
+div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
+span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
+span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
+div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
+span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
+span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
+div.ke-toolbar .ke-outline{border:none;}
\ No newline at end of file
From 6a9cb0db5d51ca5c996f13849a1d94291267b867 Mon Sep 17 00:00:00 2001
From: huang
Date: Tue, 28 Jul 2015 17:17:52 +0800
Subject: [PATCH 06/94] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E9=99=84=E4=BB=B6?=
=?UTF-8?q?=E5=8F=AA=E8=83=BD=E7=94=A8=E6=88=B7=E8=87=AA=E5=B7=B1=E6=9C=AC?=
=?UTF-8?q?=E8=BA=AB=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../attachments/_project_file_links.html.erb | 56 +++++++++++--------
1 file changed, 33 insertions(+), 23 deletions(-)
diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb
index b6d934c64..b644fb9fa 100644
--- a/app/views/attachments/_project_file_links.html.erb
+++ b/app/views/attachments/_project_file_links.html.erb
@@ -29,32 +29,32 @@
<% is_float ||= false %>
<% for attachment in attachments %>
-
- <%if is_float%>
-
- <% end%>
-
+
+ <%if is_float%>
+
+ <% end%>
+
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %>
- <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
+
<% end %>
- <%if is_float%>
-
- <% end%>
+ <%if is_float%>
+
+ <% end%>
- <% if attachment.is_text? %>
- <%= link_to image_tag('magnifier.png'),
- :controller => 'attachments',
- :action => 'show',
- :id => attachment,
- :filename => attachment.filename%>
- <% end %>
+ <% if attachment.is_text? %>
+ <%= link_to image_tag('magnifier.png'),
+ :controller => 'attachments',
+ :action => 'show',
+ :id => attachment,
+ :filename => attachment.filename%>
+ <% end %>
- <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
-
+ <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
+
(
<%= number_to_human_size attachment.filesize %>)
@@ -66,6 +66,16 @@
:class => 'delete delete-homework-icon',
:remote => true,
:title => l(:button_delete) %>
+ <% elsif attachment.container_type == 'Issue' %>
+ <% if User.current == attachment.author %>
+ <%= link_to image_tag('delete.png'), attachment_path(attachment),
+ :data => {:confirm => l(:text_are_you_sure)},
+ :method => :delete,
+ :class => 'delete',
+ #:remote => true,
+ #:id => "attachments_" + attachment.id.to_s,
+ :title => l(:button_delete) %>
+ <% end %>
<% else %>
<%= link_to image_tag('delete.png'), attachment_path(attachment),
:data => {:confirm => l(:text_are_you_sure)},
@@ -89,13 +99,13 @@
<% end %>
- <% if defined?(thumbnails) && thumbnails %>
- <% images = attachments.select(&:thumbnailable?) %>
- <% if images.any? %>
+ <% if defined?(thumbnails) && thumbnails %>
+ <% images = attachments.select(&:thumbnailable?) %>
+ <% if images.any? %>
<% images.each do |attachment| %>
<%= thumbnail_issue_tag(attachment) %>
<% end %>
- <% end %>
- <% end %>
+ <% end %>
+ <% end %>
From 9c704b7dc11e9ba6005ff448c5a08c0f74b07d76 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 29 Jul 2015 10:34:04 +0800
Subject: [PATCH 07/94] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E9=9D=99=E6=80=81=E9=A1=B5=E9=9D=A2=20?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0css=20=E8=B7=AF=E7=94=B1=E5=8F=8A=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81=E6=95=B4=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 7 +-
app/views/layouts/base_users_new.html.erb | 4 +-
app/views/users/user_newfeedback.html.erb | 87 +++++++++++++++++++++--
config/routes.rb | 2 +-
public/stylesheets/users.css | 7 ++
5 files changed, 94 insertions(+), 13 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 5cb43f4e8..816a90ac3 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -266,13 +266,10 @@ class UsersController < ApplicationController
@jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
end
-
- #@limit = 10
- #@feedback_count = @jours.count
- #@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
- #@offset ||= @feedback_pages.offset
@jour = paginateHelper @jours,10
@state = false
+
+ render :layout=>'base_users_new'
end
# end
diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb
index 632a8f66c..ec2c18602 100644
--- a/app/views/layouts/base_users_new.html.erb
+++ b/app/views/layouts/base_users_new.html.erb
@@ -163,7 +163,9 @@
<% end %>
-
+
+ <%= link_to "留言",feedback_path(User.current),:class => "f14 c_blue02"%>
+
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index deb360efd..de0bfbd60 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -1,7 +1,82 @@
-<% reply_allow = JournalsForMessage.create_by_user? User.current %>
-<%= stylesheet_link_tag 'css', :media => 'all' %>
+
+
+
用户留言
+
+
+
+
表情
+
取消
+
发布
+
+
+
+
+
+
黄井泉 :
+
上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。回复 删除
+
+
50分钟前
+
+
+
+
+
+
30分钟前
+
+
+
+
+
+
+
50分钟前
+
+
+
+
+
+
黄井泉 :
+
上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。回复 删除
+
+
50分钟前
+
+
+
+
+
30分钟前
+
+
+
+
+
+
+
50分钟前
+
+
-<%= render :partial => 'user_jours',
- :locals => { :journals => @jour, :state => false}
-%>
-<% html_title(l(:label_responses)) -%>
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 280053f60..7c1096303 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -304,7 +304,7 @@ RedmineApp::Application.routes.draw do
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
match 'user_projects', :to => 'users#user_projects', :via => :get
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
- match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
+ # match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css
index 7c3dad383..3e17f1f7b 100644
--- a/public/stylesheets/users.css
+++ b/public/stylesheets/users.css
@@ -123,6 +123,13 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; }
.newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;}
+/* 留言新增*/
+.mes_box{ width:600px;}
+.mes_box02{ margin-left:80px; border-top:1px dashed #c9c9c9; padding-top:10px;}
+.mes_box02_info{ width:500px; margin-left:5px;}
+.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
+.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
+
a.hidepic>img{display:none;}
From a667d977685c6eb66a4ba01feb7e810a8029c7a5 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 29 Jul 2015 15:55:23 +0800
Subject: [PATCH 08/94] =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=85=B6=E4=BB=96?=
=?UTF-8?q?=E4=BA=BA=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BB=96=E5=88=9B=E5=BB=BA=E7=9A=84=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 816a90ac3..0c5b441d4 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -120,9 +120,9 @@ class UsersController < ApplicationController
end
projects = @user.projects.visible.order("updated_on desc")
if(params[:status] == '1')
- projects = projects.where("user_id = ?",@user.id)
+ projects = projects.where("projects.user_id = ?",@user.id)
elsif(params[:status] == '2')
- projects = projects.where("user_id <> ?",@user.id)
+ projects = projects.where("projects.user_id <> ?",@user.id)
end
@list = paginateHelper projects,10
@params = params[:status]
@@ -261,17 +261,15 @@ class UsersController < ApplicationController
# modified by fq
def user_newfeedback
- @jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
- @jours.update_all(:is_readed => true, :status => false)
- @jours.each do |journal|
+ jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
+ jours.update_all(:is_readed => true, :status => false)
+ jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
end
- @jour = paginateHelper @jours,10
+ @jour = paginateHelper jours,10
@state = false
-
render :layout=>'base_users_new'
end
- # end
def user_comments
From 55f8484654ccf9bdf9eb337d2cc0cbf752900f8a Mon Sep 17 00:00:00 2001
From: huang
Date: Wed, 29 Jul 2015 16:54:10 +0800
Subject: [PATCH 09/94] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4JS=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/projects/_project_jours.html.erb | 272 ++++++++++-----------
public/javascripts/project.js | 5 +
2 files changed, 141 insertions(+), 136 deletions(-)
diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb
index baee72475..919abfcbf 100644
--- a/app/views/projects/_project_jours.html.erb
+++ b/app/views/projects/_project_jours.html.erb
@@ -1,15 +1,15 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
@@ -22,18 +22,18 @@
<% else %>
-
- <%= form_for('new_form', :method => :post,
- :url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
- <%= f.text_area 'project_message', :rows => 3, :cols => 65,
- :placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
-
-
- <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
- <% end %>
+ <%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
+ :url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
+ <%= f.text_area 'project_message', :rows => 3, :cols => 65,
+ :placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
+
+
+ <%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
+ <%= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
+ <% end %>
<% end %>
-
+
<%= render :partial => 'history',:locals => { :journals => @jour, :state => false} %>
@@ -42,47 +42,47 @@
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 98c148372..c7a615ba3 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -491,3 +491,8 @@ function judgeprojectname(){
}
});
}
+
+//用户反馈
+function submitProjectFeedback() {
+ $("#project_feedback_form").submit();
+}
\ No newline at end of file
From e4e99df1135f721da79932e481098af835b687d8 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 29 Jul 2015 17:41:10 +0800
Subject: [PATCH 10/94] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E4=BB=A5?=
=?UTF-8?q?=E5=8F=8A=E7=95=99=E8=A8=80=E7=9A=84=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_jours_new.html.erb | 53 +++++++++++++
app/views/users/user_newfeedback.html.erb | 91 +++++------------------
app/views/words/destroy.js.erb | 7 +-
public/javascripts/user.js | 1 -
public/stylesheets/public.css | 1 +
public/stylesheets/users.css | 17 +++--
6 files changed, 86 insertions(+), 84 deletions(-)
create mode 100644 app/views/users/_user_jours_new.html.erb
diff --git a/app/views/users/_user_jours_new.html.erb b/app/views/users/_user_jours_new.html.erb
new file mode 100644
index 000000000..81bbce319
--- /dev/null
+++ b/app/views/users/_user_jours_new.html.erb
@@ -0,0 +1,53 @@
+
+
+ <%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
+
+
+ <%= link_to "#{jour.user.login} : ".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
+
+
+
+ <%= jour.notes.html_safe %>
+
+
+
+ <%= time_tag(jour.created_on).html_safe %>
+
+
+ <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
+ <% if User.current.admin? || jour.user == User.current%>
+ <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
+ :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
+ <% end %>
+
+
+
+
+ <% fetch_user_leaveWord_reply(jour).each do |reply|%>
+
+ <% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
+
+ <%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
+
+ <%= link_to "#{reply.user.login} : ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
+
回复:
+ <%= link_to "#{parent_jour.user.login} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
+
+ <%= reply.notes.html_safe %>
+
+
+
+ <%= time_tag(reply.created_on).html_safe%>
+
+
+ <%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
+ <% if User.current.admin? || reply.user == User.current%>
+ <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
+ :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
+ <% end %>
+
+
+
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index de0bfbd60..52fc0aaa2 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -1,82 +1,27 @@
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
用户留言
-
-
表情
-
取消
-
发布
+
-
-
-
-
-
黄井泉 :
-
上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。回复 删除
-
-
50分钟前
-
-
-
-
-
-
30分钟前
-
-
-
-
-
-
-
50分钟前
-
-
-
-
-
-
黄井泉 :
-
上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。回复 删除
-
-
50分钟前
-
-
-
-
-
30分钟前
-
-
-
-
-
-
-
50分钟前
-
-
-
-
-
+
+ <%if @jour%>
+ <% @jour.each do |jour|%>
+ <%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
+ <%end%>
+ <% end%>
+
+
\ No newline at end of file
diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb
index 92e15ab93..c138a7ea7 100644
--- a/app/views/words/destroy.js.erb
+++ b/app/views/words/destroy.js.erb
@@ -2,9 +2,10 @@
alert('<%=l(:notice_failed_delete)%>');
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
<% if @is_user%>
- $("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove();
- var params = init_list_more_div_params($("#nh_messages"));
- change_status_4_list_more_div(params);
+ var destroyedItem = $('#<%=@journal_destroyed.id%>');
+ destroyedItem.fadeOut(600,function(){
+ destroyedItem.remove();
+ });
<% else %>
<% if @bid && @jours_count %>
$('#jours_count').html("<%= @jours_count %>");
diff --git a/public/javascripts/user.js b/public/javascripts/user.js
index 7c7189066..9ad3d1588 100644
--- a/public/javascripts/user.js
+++ b/public/javascripts/user.js
@@ -10,7 +10,6 @@ $(function(){
//个人动态
$(function(){
-
function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index d0893ca3d..c1e47c787 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -87,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt10{ margin-top:10px;}
.mt30{ margin-top: 30px;}
.mb5{ margin-bottom:5px;}
+.mb8{ margin-bottom:8px;}
.mb10{ margin-bottom:10px;}
.mb20{ margin-bottom:20px;}
.pl15{ padding-left:15px;}
diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css
index 3e17f1f7b..bdc6db47c 100644
--- a/public/stylesheets/users.css
+++ b/public/stylesheets/users.css
@@ -24,12 +24,14 @@ a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; dis
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
-.message_list_box{ background:#f5f5f5; padding:10px;}
-.users_pic{ width:27px; height:27px; border:1px solid #e3e3e3;}
+.message_list_box{ background:#f5f5f5; padding:10px;margin-top: 10px;}
+.users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;}
.users_pic:hover{ border:1px solid #a5a5a5;}
+.users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}
+.users_pic_sub:hover{ border:1px solid #a5a5a5;}
.massage_txt{ max-width:360px; color: #666;word-break:break-all;}
.massage_time{ color:#8d8d8d; margin-top:5px;}
-.message_list{ border-bottom:1px dashed #c9c9c9; padding-bottom:10px; margin-bottom:10px;}
+.message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;}
.message_list_more{ text-align:center; width:720px;}
/*课程动态*/
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
@@ -124,9 +126,9 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;}
/* 留言新增*/
-.mes_box{ width:600px;}
-.mes_box02{ margin-left:80px; border-top:1px dashed #c9c9c9; padding-top:10px;}
-.mes_box02_info{ width:500px; margin-left:5px;}
+.mes_box{ width:590px;}
+.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
+.mes_box02_info{ width:540px; margin-left:5px;}
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
@@ -139,4 +141,5 @@ span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
-div.ke-toolbar .ke-outline{border:none;}
\ No newline at end of file
+div.ke-toolbar .ke-outline{border:none;}
+.cr{clear: right;}
\ No newline at end of file
From 9bcc633d19c34f0497c64f5467bcdef4d0995388 Mon Sep 17 00:00:00 2001
From: huang
Date: Wed, 29 Jul 2015 17:56:40 +0800
Subject: [PATCH 11/94] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0tag?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=BC=BA=E9=99=B7=201=E3=80=81=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0ajax=E8=87=AA=E8=BA=AB=E5=88=B7=E6=96=B0=202=E3=80=81?=
=?UTF-8?q?=E5=88=A0=E9=99=A4=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/tags/_project_tag.html.erb | 17 +++--------
app/views/tags/_tag_project_new_name.html.erb | 30 +++++++++++++++++++
app/views/tags/remove_tag.js.erb | 3 ++
app/views/tags/tag_save.js.erb | 4 +++
4 files changed, 41 insertions(+), 13 deletions(-)
create mode 100644 app/views/tags/_tag_project_new_name.html.erb
diff --git a/app/views/tags/_project_tag.html.erb b/app/views/tags/_project_tag.html.erb
index ce80e36ab..408f3ba1d 100644
--- a/app/views/tags/_project_tag.html.erb
+++ b/app/views/tags/_project_tag.html.erb
@@ -1,15 +1,6 @@
-
- <%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
+
-<% if User.current.logged?%>
-
<%= l(:label_add_tag)%>
-
- <%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
- <%= f.text_field :name ,:id => "tags_name",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
- <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
- <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
-
- <% end %>
-
-<% end%>
diff --git a/app/views/tags/_tag_project_new_name.html.erb b/app/views/tags/_tag_project_new_name.html.erb
new file mode 100644
index 000000000..e657071bc
--- /dev/null
+++ b/app/views/tags/_tag_project_new_name.html.erb
@@ -0,0 +1,30 @@
+<% @tags = obj.reload.tag_list %>
+<% if non_list_all && @tags.size > 0 %>
+
+<% else %>
+
+ <% 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, :class => 'pt5' %>
+
+ <%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
+
+
+ <% end %>
+ <% end %>
+<% end %>
+
+<% if User.current.logged?%>
+
<%= l(:label_add_tag)%>
+
+ <%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
+ <%= f.text_field :name ,:id => "tags_name2",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
+ <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
+ <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
+
+ <% end %>
+
+<% end%>
+
+
diff --git a/app/views/tags/remove_tag.js.erb b/app/views/tags/remove_tag.js.erb
index b8c65c13e..cd56fef1a 100644
--- a/app/views/tags/remove_tag.js.erb
+++ b/app/views/tags/remove_tag.js.erb
@@ -2,6 +2,9 @@
<% if @object_flag == '3'%>
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
+<% elsif @object_flag == '2'%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
<% elsif @object_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb
index 74a38c99d..992c472ed 100644
--- a/app/views/tags/tag_save.js.erb
+++ b/app/views/tags/tag_save.js.erb
@@ -4,6 +4,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$('#put-tag-form-issue').hide();
$('#name-issue').val("");
+<% elsif @obj_flag == '2'%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+$('#tags_name2').val("");
<% elsif @obj_flag == '6'%>
<%if @course%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
From d790fb31e497198d906dab090a59eb2a797dfdae Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 29 Jul 2015 18:00:35 +0800
Subject: [PATCH 12/94] =?UTF-8?q?=E5=8C=BF=E5=90=8D=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=B8=8D=E5=8F=AF=E5=9C=A8=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E7=95=99=E8=A8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/words_controller.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 161791954..4b99224ca 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -4,7 +4,7 @@ class WordsController < ApplicationController
include ApplicationHelper
before_filter :find_user, :only => [:new, :create, :destroy, :more, :back]
def create
- if params[:new_form][:user_message].size>0
+ if params[:new_form][:user_message].size>0 && User.current.logged?
unless params[:user_id].nil?
if params[:reference_content]
message = params[:new_form][:user_message] + "\n" + params[:reference_content]
@@ -31,9 +31,7 @@ class WordsController < ApplicationController
# @jour = paginateHelper @jours,10
respond_to do |format|
- # format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
format.js
- #format.api { render_api_ok }
end
end
From ce89c7d1191dcc79b8ef6f49fa7af60b8c40f8f6 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Wed, 29 Jul 2015 18:26:04 +0800
Subject: [PATCH 13/94] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E5=90=8E=E7=95=8C=E9=9D=A2=E7=9A=84=E5=88=B7=E6=96=B0=EF=BC=8C?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E7=9A=84=E5=88=86=E9=A1=B5=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/words_controller.rb | 20 ++++++++++----------
app/views/users/_user_jours_new.html.erb | 1 +
app/views/users/user_newfeedback.html.erb | 21 +++++++++++++--------
config/routes.rb | 1 +
4 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 4b99224ca..fc723d5d5 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -18,17 +18,10 @@ class WordsController < ApplicationController
list = User.find(refer_user_id).add_jour(User.current, message, refer_user_id)
end
@jour = list.last
- # @user.count_new_jour
- # if a_message.size > 5
- # @message = a_message[-5, 5]
- # else
- # @message = a_message
- # end
- # @message_count = a_message.count
end
end
- # @jours = @user.journals_for_messages.where('m_parent_id IS NULL').reverse
- # @jour = paginateHelper @jours,10
+ jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
+ @jour = paginateHelper jours,10
respond_to do |format|
format.js
@@ -91,7 +84,6 @@ class WordsController < ApplicationController
end
respond_to do |format|
format.js
- #format.api { render_api_ok }
end
end
@@ -204,7 +196,15 @@ class WordsController < ApplicationController
flash[:error] = feedback.errors.full_messages[0]
redirect_to project_feedback_url(params[:id])
end
+ end
+ #给用户留言
+ def leave_user_message
+ @user = User.find(params[:id])
+ if params[:new_form][:user_message].size>0 && User.current.logged? && @user
+ @user.add_jour(User.current, params[:new_form][:user_message])
+ end
+ redirect_to feedback_path(@user)
end
# add by nwb
diff --git a/app/views/users/_user_jours_new.html.erb b/app/views/users/_user_jours_new.html.erb
index 81bbce319..7aa9d97ff 100644
--- a/app/views/users/_user_jours_new.html.erb
+++ b/app/views/users/_user_jours_new.html.erb
@@ -15,6 +15,7 @@
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
+
<% if User.current.admin? || jour.user == User.current%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index 52fc0aaa2..d594e47e4 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -5,22 +5,27 @@
-
-
-
-
- 取消
- 留言
-
+ <%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
+
+
+
+
取消
+
留言
+ <% end%>
-
+
<%if @jour%>
<% @jour.each do |jour|%>
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<%end%>
<% end%>
+
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+
diff --git a/config/routes.rb b/config/routes.rb
index 7c1096303..1536340da 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -791,6 +791,7 @@ RedmineApp::Application.routes.draw do
match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
+ post 'words/:id/leave_user_message', :to => 'words#leave_user_message', :as => "leave_user_message"
post 'join_in/join', :to => 'courses#join', :as => 'join'
delete 'join_in/join', :to => 'courses#unjoin'
From 206d1a38f7484d50a0273da56001902643679948 Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 30 Jul 2015 09:07:11 +0800
Subject: [PATCH 14/94] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E5=8A=A8=E6=80=81=E7=BC=BA=E9=99=B7=E5=BC=82=E5=B8=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/project.css | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index fa1bec754..621e0c556 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -74,7 +74,11 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
.problem_txt{ width:600px; margin-left:10px; color:#777777; }
.pro_txt_w{width:610px;}
-a.problem_name{ color:#ff5722; }
+a.problem_name{ color:#ff5722;max-width: 80px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
From 023f51260a2cee67fa1e4bc83e7f5fe74d4d7eb1 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 30 Jul 2015 09:12:43 +0800
Subject: [PATCH 15/94] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=95=8C=E9=9D=A2js=E5=88=B7=E6=96=B0?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=97=B6=E5=80=99=E7=BB=99=E5=87=BA?=
=?UTF-8?q?=E7=AD=89=E5=BE=85=E7=9A=84=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_users_new.html.erb | 3 +++
public/stylesheets/users.css | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb
index ec2c18602..70106e4a3 100644
--- a/app/views/layouts/base_users_new.html.erb
+++ b/app/views/layouts/base_users_new.html.erb
@@ -269,6 +269,9 @@
<%= render :partial => 'layouts/new_feedback' %>
+
+ <%= l(:label_loading) %>
+
diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css
index bdc6db47c..649ce1255 100644
--- a/public/stylesheets/users.css
+++ b/public/stylesheets/users.css
@@ -126,7 +126,7 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;}
/* 留言新增*/
-.mes_box{ width:590px;}
+.mes_box{ width:580px;}
.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
.mes_box02_info{ width:540px; margin-left:5px;}
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
From 51a7044e057ecf112d710e2736dbf464dd15b456 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 30 Jul 2015 09:20:54 +0800
Subject: [PATCH 16/94] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E7=95=99=E8=A8=80=E5=9B=BE=E7=89=87=E6=9C=80=E5=A4=A7=E5=AE=BD?=
=?UTF-8?q?=E5=BA=A6=E4=B8=BA100%?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/user_newfeedback.html.erb | 2 +-
public/stylesheets/public_new.css | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index d594e47e4..f9573f65e 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -15,7 +15,7 @@
-