From 4d82f0c959e2f3c0f7793bc6389894a359a8dd9b Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 16 Mar 2016 16:03:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E3=80=81=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=97=AE=E9=A2=98=E8=B7=9F=E8=B8=AA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=8Aissue=E5=8A=A8=E6=80=81=E8=A6=81=E5=8F=B3?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E3=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 3 +++ app/views/issues/show.html.erb | 3 +++ app/views/users/_project_issue.html.erb | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index eb78c4c5b..f0148fc71 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -118,6 +118,9 @@ class IssuesController < ApplicationController end def show + # 打开编辑内容 + @is_edit = true unless params[:edit].nil? + # 当前用户查看指派给他的缺陷消息,则设置消息为已读 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? diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index b9d463855..4b82f8665 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -9,6 +9,9 @@ $(function(){ $("#RSide").removeAttr("id"); $("#Container").css("width","1000px"); + if(<%= @is_edit %>) { + issueEditShow(); + } });