diff --git a/app/controllers/discuss_demos_controller.rb b/app/controllers/discuss_demos_controller.rb
index 1b140714f..a0955efe2 100644
--- a/app/controllers/discuss_demos_controller.rb
+++ b/app/controllers/discuss_demos_controller.rb
@@ -25,6 +25,11 @@ class DiscussDemosController < ApplicationController
end
def destroy
+ asset = Kindeditor::Asset.find_by_owner_id(params[:id])
+ filepath = File.join(Rails.root,"public","files","uploads",
+ asset[:created_at].to_s.gsub("+0800","").to_datetime.strftime("%Y%m").to_s,
+ asset[:asset].to_s)
+ File.delete(filepath) if File.exist?filepath
DiscussDemo.destroy(params[:id])
redirect_to :controller=> 'discuss_demos',:action => 'index'
end
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 545d61155..9bf2ee846 100644
--- a/app/controllers/documents_controller.rb
+++ b/app/controllers/documents_controller.rb
@@ -91,6 +91,7 @@ class DocumentsController < ApplicationController
def update
@document.safe_attributes = params[:document]
+ @document.save_attachments(params[:attachments])
if request.put? and @document.save
flash[:notice] = l(:notice_successful_update)
redirect_to document_url(@document)
diff --git a/app/views/documents/_form.html.erb b/app/views/documents/_form.html.erb
index 72361b9ab..50f47e5f7 100644
--- a/app/views/documents/_form.html.erb
+++ b/app/views/documents/_form.html.erb
@@ -11,8 +11,8 @@
<%= wikitoolbar_for 'document_description' %>
-<% if @document.new_record? %>
+
<%= render :partial => 'attachments/form', :locals => {:container => @document} %>
-<% end %>
+
diff --git a/app/views/documents/edit.html.erb b/app/views/documents/edit.html.erb
index 8a6122f8c..5c6ed2383 100644
--- a/app/views/documents/edit.html.erb
+++ b/app/views/documents/edit.html.erb
@@ -1,4 +1,6 @@
-<%=l(:label_document)%>
+
+
<%=l(:label_document_plural)%>
+
<%= labelled_form_for @document do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
diff --git a/app/views/issues/_newissue_index.html.erb b/app/views/issues/_newissue_index.html.erb
deleted file mode 100644
index 4b282aa8f..000000000
--- a/app/views/issues/_newissue_index.html.erb
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
问题跟踪
-
-
- <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
-
- <% if User.current.member_of?(@project) %>
- <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
- :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
- <% end %>
- <%= link_to l(:label_query), '#', :class => 'icon icon-help',
- :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
-
- <% end %>
- 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %>
-
-
- <% if !@query.new_record? && @query.editable_by?(User.current) %>
- <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
- <%= delete_link query_path(@query) %>
- <% end %>
-
-
-<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
-
- <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
- <%= hidden_field_tag 'set_filter', '1' %>
-
-
-
---<%= l :label_query_new %>---
-
-
-
-
-
- <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
- <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
-
-
-
- <% end %>
-
-
-<%= error_messages_for 'query' %>
-
-<% if @query.valid? %>
- <% if @issues.empty? %>
-
- <%= l(:label_no_data) %>
-
- <% else %>
- <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
-
- <% end %>
-
- <% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
- <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
- <%= f.link_to 'PDF', :url => params %>
- <% end %>
-
-
-
-
-
<%= l(:label_export_options, :export_format => 'CSV') %>
- <%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
-
-
-
-
-
-
-
-
-
- <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
- <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
-
- <% end %>
-
-
-<% end %>
-
-<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
-
-<% content_for :sidebar do %>
- <%= render :partial => 'issues/sidebar' %>
-<% end %>
-
-<% content_for :header_tags do %>
- <%= auto_discovery_link_tag(:atom,
- {:query_id => @query, :format => 'atom',
- :page => nil, :key => User.current.rss_key},
- :title => l(:label_issue_plural)) %>
- <%= auto_discovery_link_tag(:atom,
- {:controller => 'journals', :action => 'index',
- :query_id => @query, :format => 'atom',
- :page => nil, :key => User.current.rss_key},
- :title => l(:label_changes_details)) %>
-<% end %>
-
-<%= context_menu issues_context_menu_path %>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index b3750a770..4b282aa8f 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -1 +1,139 @@
-<%= render :partial => 'issues/newissue_index' %>
\ No newline at end of file
+
+
问题跟踪
+
+
+ <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
+
+ <% if User.current.member_of?(@project) %>
+ <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
+ :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
+ <% end %>
+ <%= link_to l(:label_query), '#', :class => 'icon icon-help',
+ :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
+
+ <% end %>
+ 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %>
+
+
+ <% if !@query.new_record? && @query.editable_by?(User.current) %>
+ <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
+ <%= delete_link query_path(@query) %>
+ <% end %>
+
+
+<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
+
+ <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %>
+ <%= hidden_field_tag 'set_filter', '1' %>
+
+
+
---<%= l :label_query_new %>---
+
+
+
+
+
+ <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
+ <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
+
+
+
+ <% end %>
+
+
+<%= error_messages_for 'query' %>
+
+<% if @query.valid? %>
+ <% if @issues.empty? %>
+
+ <%= l(:label_no_data) %>
+
+ <% else %>
+ <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
+
+ <% end %>
+
+ <% other_formats_links do |f| %>
+ <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
+ <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
+ <%= f.link_to 'PDF', :url => params %>
+ <% end %>
+
+
+
+
+
<%= l(:label_export_options, :export_format => 'CSV') %>
+ <%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
+
+
+
+
+
+
+
+
+
+ <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
+ <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
+
+ <% end %>
+
+
+<% end %>
+
+<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
+
+<% content_for :sidebar do %>
+ <%= render :partial => 'issues/sidebar' %>
+<% end %>
+
+<% content_for :header_tags do %>
+ <%= auto_discovery_link_tag(:atom,
+ {:query_id => @query, :format => 'atom',
+ :page => nil, :key => User.current.rss_key},
+ :title => l(:label_issue_plural)) %>
+ <%= auto_discovery_link_tag(:atom,
+ {:controller => 'journals', :action => 'index',
+ :query_id => @query, :format => 'atom',
+ :page => nil, :key => User.current.rss_key},
+ :title => l(:label_changes_details)) %>
+<% end %>
+
+<%= context_menu issues_context_menu_path %>
diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb
deleted file mode 100644
index 866882053..000000000
--- a/app/views/issues/index.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 6d50d8bd2..3c487db5a 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -77,7 +77,7 @@ a:hover.subnav_green{ background:#14ad5a;}
/*右侧内容--动态*/
/*右侧内容--动态*/
.project_r_h{height:40px; background:#eaeaea; margin-bottom:10px;}
-.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
+.project_h2{ background:#64bdd9; color:#fff; height:29px; width:90px; text-align:center; font-weight:normal; padding-top:10px; font-size:16px;padding-left:10px;}
.project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;}
.project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;}
a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;}