diff --git a/app/controllers/avatar_controller.rb b/app/controllers/avatar_controller.rb
index a7c0e7b95..b5c174b0c 100644
--- a/app/controllers/avatar_controller.rb
+++ b/app/controllers/avatar_controller.rb
@@ -10,7 +10,7 @@ class AvatarController < ApplicationController
unless request.content_type == 'application/octet-stream'
@source_type = params[:source_type]
@source_id = params[:source_id]
- @temp_file = params[:avatar][:image]
+ @temp_file = params[:avatar][:image]
@image_file = @temp_file.original_filename
else
unless request.raw_post.nil?
@@ -23,7 +23,7 @@ class AvatarController < ApplicationController
#image_file.force_encoding("UTF-8") if filename.respond_to?(:force_encoding)
else
@image_file=params[:filename]
- end
+ end
@temp_file = StringIO.new(@temp_file)
end
end
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index bca9de22b..70a0b76b8 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -230,6 +230,7 @@ class FilesController < ApplicationController
@order = ""
@is_remote = false
if params[:project_id]
+ @page = params[:page] ? params[:page].to_i + 1 : 2
@container_type = 0
if params[:sort]
params[:sort].split(",").each do |sort_type|
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 91a0bc902..4aa959e81 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -412,6 +412,7 @@ class IssuesController < ApplicationController
if params[:issue_id]
@issue_id = params[:issue_id]
end
+ @priorities = IssuePriority.active
respond_to do |format|
format.js
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 56ef460a0..9b7888bf2 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -59,6 +59,19 @@ module ApplicationHelper
end
end
+ # 判断组织左侧展开或者隐藏
+ def is_hide_org_left obj
+ if obj.nil?
+ return true
+ else
+ if obj.hide == 0
+ return true
+ else
+ return false
+ end
+ end
+ end
+
# Time 2015-03-24 16:38:05
# Author lizanle
# Description after save后需要进行资源记录的更新
diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb
index 5a6ce69ce..9513baab0 100644
--- a/app/views/files/_course_file.html.erb
+++ b/app/views/files/_course_file.html.erb
@@ -123,7 +123,7 @@
- <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments, :page=>2} %>
+ <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
<% html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb
index d84c1cada..0d4b0f35e 100644
--- a/app/views/files/_project_list.html.erb
+++ b/app/views/files/_project_list.html.erb
@@ -45,8 +45,17 @@
<% end %>
<% end %>
-
- <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
-
+<% if project_attachments.count == 10%>
+ <% if params[:action] == 'search_project' %>
+
+
+
+ <%=link_to "点击展开更多", search_project_project_files_path({:project_id => project.id, :page => @obj_pages.nil? ? @feedback_pages.page + 1 : @obj_pages.page + 1}.merge(params)),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
+ <%else%>
+
+ <%=link_to "点击展开更多", project_files_path(:project_id => project.id,:page => @page),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
+ <%end%>
+<% end%>
+
diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb
index edc8d257b..eca7685cb 100644
--- a/app/views/issues/add_journal.js.erb
+++ b/app/views/issues/add_journal.js.erb
@@ -1,6 +1,21 @@
<% if @issue_id %> //issue详情中回复
$("#reply_div_<%= @issue_id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => Issue.find( @issue_id),:replies_all_i=>0}) %>");
$("#div_issue_attachment_<%=@issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => Issue.find( @issue_id)}) %>");
+ $("#issue_edit").replaceWith('<%= escape_javascript(render :partial => 'issues/edit') %>')
+ sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
+ issue_desc_editor = KindEditor.create('#issue_description',
+ {"width":"85%",
+ "resizeType":0,
+ "no_label":true,
+ "at_id":<%= @issue.project_id%>,
+ "at_type":"Project",
+ "autoHeightMode":true,
+ "afterCreate":"eval(function(){ if(typeof enablePasteImg ==='function'){enablePasteImg(self);};if(typeof enableAt ==='function'){enableAt(self, \"<%=@issue.project_id %>\", 'Project');}; this.loadPlugin('autoheight')})",
+ "emotionsBasePath":'<%= Setting.host_name%>',
+ "height":300,
+ "allowFileManager":true,
+ "uploadJson":"/kindeditor/upload",
+ "fileManagerJson":"/kindeditor/filemanager"});
// $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>");
$(".homepagePostReplyBannerCount").html('回复(<%= Issue.find( @issue_id).journals.count %>)')
sd_create_editor_from_data(<%= @issue.id %>, null, "100%");
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 8280a2be7..31d6925db 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -37,10 +37,10 @@
<% org_activity_field = organization.org_subfields.where('field_type="default" and name="activity" and field_type="default"').first %>
<% org_course_field = organization.org_subfields.where('field_type="default" and name="course" and field_type="default"').first %>
<% org_project_field = organization.org_subfields.where('field_type="default" and name="project" and field_type="default"').first %>
-