+
<%= link_to_user_header(activity.user,false,:class => 'problem_name c_orange fl') %>
<%= activity.course_act_type == "Course" ? "创建了课程" : l(:label_new_activity) %>:
diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb
index 353d19dab..e31eea960 100644
--- a/app/views/files/_course_list.html.erb
+++ b/app/views/files/_course_list.html.erb
@@ -3,13 +3,13 @@
共有 <%= all_attachments.count%> 个资源
<% if order == "asc" %>
- 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
- <%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
- <%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
+ 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
<% else %>
- 按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
- <%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
- <%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
+ 按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
<% end %>
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 9db34ece4..f5e22002a 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -3,7 +3,7 @@
<% if tag_name && tag_name == k%>
<%= k%>×<%= v%>
<% else%>
-
<%= k%>×<%= v%>
+
<%= k%>×<%= v%>
<% end%>
<% end%>
<% end%>
\ No newline at end of file
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index aefa1a5a9..34f7452a7 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -223,6 +223,56 @@
});
}
+ <% if @course %>
+ var tagNameHtml; //当前双击的链接的父节点的html
+ var tagName; //标签的值
+ var parentCssBorder; //当前双击的链接的父节点
+ var ele; //当前双击的链接
+ var tagId; //标签的id
+ var taggableType; //被标签的类型
+ //这里renameTag有两种情况,一种是改变某个资源的tag名称。如果其他资源也有这个tag。则新增一个改变后的tag名
+ //第二种是改变某个tag名称。其他所有的资源如果拥有这个tag。那么对应的tag名也要改掉。
+ //目前这两种依据 的来源就是 是否 传了参数 id。如果有id。就指定了资源id,就是第一种情况。如果没有id。就是第二种情况
+ function rename_tag(domEle,name,id,type){
+ if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动
+ return;
+ }
+ tagNameHtml = domEle.parent().html()
+ tagName = name;
+ parentCssBorder = domEle.parent().css("border");
+ ele = domEle;
+ tagId = id;
+ taggableType = type;
+ width = parseInt(domEle.css('width').replace('px','')) >=100 ? parseInt(domEle.css('width').replace('px','')) : 100
+ domEle.html('
');
+ domEle.parent().css("border","1px solid #ffffff");
+ $("#renameTagName").focus();
+ }
+ //监听所有的单击事件
+ $(document.body).click(function(e){
+ node = document.elementFromPoint(e.clientX, e.clientY);
+ if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了
+ 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 %>
diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb
new file mode 100644
index 000000000..560afc6d9
--- /dev/null
+++ b/app/views/forums/_file_form.html.erb
@@ -0,0 +1,79 @@
+
+
+
+<% if defined?(container) && container && container.saved_attachments %>
+ <% container.attachments.each_with_index do |attachment, i| %>
+
+ <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %><%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %><%= l(:field_is_public) %>:
+ <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
+ <%= if attachment.id.nil?
+ #待补充代码
+ else
+ link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
+ end
+ %>
+ <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
+
+ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
+
+
+ <% end %>
+ <% container.saved_attachments.each_with_index do |attachment, i| %>
+
+ <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
+ <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
+ <%= l(:field_is_public) %>:
+ <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
+ <%= if attachment.id.nil?
+ #待补充代码
+ else
+ link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
+ end
+ %>
+ <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
+
+ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
+
+
+ <% end %>
+<% end %>
+
+ <% project = project %>
+
+
+ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
+
+ <%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'AnnexBtn fl mt3' %>
+
上传附件
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => '_file',
+ :class => 'file_selector',
+ :multiple => true,
+ :onchange => 'addInputFiles(this);',
+ :style => ie8? ? '' : 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js', :project => project),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all)
+ } %>
+
+
+
+
+ <%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>
+
+
+
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'attachments' %>
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/forums/_form_edit_mode.html.erb b/app/views/forums/_form_edit_mode.html.erb
index a9bb05f79..ade5a24c4 100644
--- a/app/views/forums/_form_edit_mode.html.erb
+++ b/app/views/forums/_form_edit_mode.html.erb
@@ -1,49 +1,26 @@
-
-
-
- <%= labelled_form_for(@forum) do |f| %>
- <% if @forum.errors.any? %>
-
- <% end %>
-
-
- <%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
-
-
- <% if User.current.logged? && User.current.admin? %>
- <% if @forum.safe_attribute? 'sticky' %>
- <%= f.check_box :sticky %>
- <%= label_tag 'message_sticky', l(:label_board_sticky) %>
- <% end %>
- <% if @forum.safe_attribute? 'locked' %>
- <%= f.check_box :locked %>
- <%= label_tag 'message_locked', l(:label_board_locked) %>
- <% end %>
+
+ <%= labelled_form_for(@forum) do |f| %>
+
+
+
+
+
+
+
+
+
<% end %>
-
-
- <%= f.kindeditor :description, :required => true,:owner_id => @forum.id,:owner_type => 2 %>
-
-
-
- (<%= l(:label_forums_max_length) %>)
-
-
-
- <%= submit_tag l(:button_submit) %>
- <%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
-
- <% end %>
-
+
\ No newline at end of file
diff --git a/app/views/forums/_forum_form.html.erb b/app/views/forums/_forum_form.html.erb
new file mode 100644
index 000000000..9888b674e
--- /dev/null
+++ b/app/views/forums/_forum_form.html.erb
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb
index ac27235eb..286219356 100644
--- a/app/views/forums/_forum_list.html.erb
+++ b/app/views/forums/_forum_list.html.erb
@@ -1,57 +1,38 @@
-
-
+
<% if forums.any? %>
<% forums.each do |forum| %>
-
-
- <%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
-
-
-
-
-
-
- <%= link_to h(forum.name), forum_path(forum) %>
-
-
-
-
-
-
- <%= textAreailizable forum.description%>
-
-
-
-
-
-
- <%= authoring forum.created_at, forum.creator %>
-
-
-
-
-
-
-
-
-
- <%= link_to (forum.memo_count), forum_path(forum) %>
-
-
- <%= link_to (forum.topic_count), forum_path(forum) %>
-
-
-
- 回答
- 帖子
-
-
-
-
+
+
+
+
+
+ <%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %>
+
+
<%= textAreailizable forum.description%>
+
+
创建时间:<%= format_date(forum.created_at) %>
+
+
+
+
+ <%= link_to ( forum.topic_count), forum_path(forum),:class=>"linkGrey5 fb" %>
+
+
帖子
+
+
+
+
+
+ <%= link_to (forum.memo_count), forum_path(forum),:class=>"linkGrey5 fb" %>
+
+
回答
+
+
+
<% end %>
-
+
<% else %>
-<% end %>
-
\ No newline at end of file
+ <%= render :partial => "layouts/no_content" %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/forums/_forum_tag_list.html.erb b/app/views/forums/_forum_tag_list.html.erb
new file mode 100644
index 000000000..b074cbca3
--- /dev/null
+++ b/app/views/forums/_forum_tag_list.html.erb
@@ -0,0 +1,8 @@
+<% forum.tag_list.each do |tag|%>
+
+ <%= tag %>
+ <%if forum.creator.id == User.current.id%>
+ ×
+ <% end %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/forums/_post_banner.html.erb b/app/views/forums/_post_banner.html.erb
new file mode 100644
index 000000000..797b43245
--- /dev/null
+++ b/app/views/forums/_post_banner.html.erb
@@ -0,0 +1,33 @@
+
+
+
综合
+ <% if order_type=='reorder_complex' && order_str == 'desc' %>
+
+ <% elsif order_type=='reorder_complex' && order_str == 'asc' %>
+
+ <% else %>
+
+ <% end %>
+
+
人气
+ <% if order_type=='reorder_popu' && order_str == 'desc' %>
+
+ <% elsif order_type=='reorder_popu' && order_str == 'asc' %>
+
+ <% else %>
+
+ <% end %>
+
+
时间
+ <% if order_type=='reorder_time' && order_str == 'desc' %>
+
+ <% elsif order_type=='reorder_time' && order_str == 'asc' %>
+
+ <% else %>
+
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb
index f8679cefa..d6e3f607b 100644
--- a/app/views/forums/_show_topics.html.erb
+++ b/app/views/forums/_show_topics.html.erb
@@ -1,47 +1,31 @@
-
-
共有 <%=link_to @forum.memos.count %> 个贴子
<% if memos.any? %>
<% memos.each do |topic| %>
-
-
-
- <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
-
-
-
-
- <%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %>
-
-
-
- <%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %>
-
-
- 回答
-
-
-
-
-
-
-
- <%= authoring topic.created_at, topic.author %>
-
- <% author = topic.last_reply.try(:author)%>
- <% if author%>
- 最后回复:<%=link_to_user author %>
- <% end%>
-
-
-
-
-
-
-
-
+
+
+
+ <%= link_to image_tag(url_to_avatar(topic.author), :width => 50,:height => 50,:alt => '贴吧图片'), user_path(topic.author) if topic.author%>
+
+
+
+
<%= topic.content.html_safe%>
+
+
+ <% author = topic.last_reply.try(:author)%>
+ <% if author%>
+
+
<%= format_date(topic.last_reply.created_at)%>
+ <% end%>
+
+
+
+
+ <%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
+
+
+
<% end %>
-
+
<% else %>
<%= l(:label_no_data) %>
<% end %>
diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb
new file mode 100644
index 000000000..be99d724a
--- /dev/null
+++ b/app/views/forums/create.js.erb
@@ -0,0 +1,6 @@
+<%if @save_flag%>
+$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
+$('#reorder_time').click();
+<%else%>
+ $("#error").html("<%= @forum.errors.full_messages[0]%>").show();
+<%end %>
\ No newline at end of file
diff --git a/app/views/forums/delete_forum_tag.js.erb b/app/views/forums/delete_forum_tag.js.erb
new file mode 100644
index 000000000..5080b3bdd
--- /dev/null
+++ b/app/views/forums/delete_forum_tag.js.erb
@@ -0,0 +1,2 @@
+$("#forum_tag_list").html("<%= escape_javascript( render :partial=>'forum_tag_list',:locals=>{:forum=>@forum}) %>");
+$('#add_tag01').hide();
\ No newline at end of file
diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb
index 0a40120c7..1fcbc6cab 100644
--- a/app/views/forums/edit.html.erb
+++ b/app/views/forums/edit.html.erb
@@ -1,4 +1,78 @@
-
-
编辑讨论区
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
+
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'new_user' %>
+
<%= render 'form_edit_mode' %>
+
\ No newline at end of file
diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb
index 85cab957a..c31790f30 100644
--- a/app/views/forums/index.html.erb
+++ b/app/views/forums/index.html.erb
@@ -1,48 +1,177 @@
-<% @nav_dispaly_home_path_label = 1
- @nav_dispaly_main_course_label = 1
- @nav_dispaly_main_project_label = 1
- @nav_dispaly_main_contest_label = 1 %>
-
-
-
-
- 公共贴吧
-
-
- <%= l(:label_user_location) %> :
-
-
-
- <% if User.current.logged? %>
- <%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %>
- <% end %>
-
-
-
- <%#= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
- <%#= text_field_tag 'name', params[:name], :size => 20 %>
- <%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
- <%# end %>
-
-
-
-
-
-
- <%= link_to request.host()+"/forums", forums_path %>
-
-
-
- <%= link_to l(:field_homepage), home_path %> >
- <%= link_to "公共贴吧", forums_path %>
-
-
-
-
-<% if @forums.size > 0 %>
- <%= render :partial => 'forums/forum_list', :locals => {:forums => @forums} %>
-<% else %>
- <%= render :partial => "layouts/no_content" %>
-<% end %>
+<%= javascript_include_tag 'new_user' %>
+<%= stylesheet_link_tag 'public'%>
+
+
+
+
+
+
+
error
+ <%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
+
+
+
+
+
+
+
+
+
+ <% end %>
+
+
+ <%= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str}%>
+
+
+
+
+
+
+
+
+ <%= render :partial => 'forum_list',:locals => {:forums=>@forums}%>
+
+
+ <%= pagination_links_full @forums_pages, @forums_count ,:per_page_links => true,:remote =>true,:flag=>true%>
+
+
+
+
+
diff --git a/app/views/forums/index.js.erb b/app/views/forums/index.js.erb
new file mode 100644
index 000000000..642c3c20a
--- /dev/null
+++ b/app/views/forums/index.js.erb
@@ -0,0 +1,4 @@
+//$("#postBanner").html("<%#= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str }%>");
+$("#forum_list").html("<%= escape_javascript(render :partial => 'forum_list',:locals => {:forums=>@forums}) %>");
+//这里出现一个问题竟然是单双引号引起的。注意!!
+$("#pages").html('<%= pagination_links_full @forums_pages, @forums_count,:per_page_links => false,:remote =>true,:flag=>true%>');
\ No newline at end of file
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb
index 24aa74c23..48ac057a0 100644
--- a/app/views/forums/show.html.erb
+++ b/app/views/forums/show.html.erb
@@ -1,42 +1,144 @@
-
-
-
- <%=l(:label_memo_new)%>
-
- <% if User.current.logged? %>
- <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
-
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
-
- <%= f.text_field :subject, :required => true, :maxlength => 50%>
-
-
- <%= f.kindeditor :content, :required => true %>
-
-
-
- (<%= l(:label_memos_max_length) %>)
-
-
- <%= l(:label_attachment_plural) %>
-
- <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
-
-
- <%= f.submit :value => l(:label_memo_create) %>
- <%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
-
- <% end %>
- <% end %>
+<%= javascript_include_tag 'new_user' %>
+
+
+
+
error
+ <%= labelled_form_for(@memo, :url => forum_memos_path(@forum)) do |f| %>
+
+
+
+
+
+
+
+
+
+
+ <%= render :partial => 'file_form', :locals => {:container => @memo} %>
+
+
+
+
+ <% end %>
+
+
+
+ <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%>
+
+
+ <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %>
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- <%= link_to(image_tag('edit.png')+l(:label_forum_edit),{:action => 'edit', :id => @forum}, :method => 'get', :title => l(:button_edit)) if @forum.editable_by?(User.current) %>
- <%= link_to(image_tag('delete.png')+'删除讨论区', {:action => 'destroy', :id => @forum}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete)
- ) if @forum.destroyable_by?(User.current) %>
-
-
- <%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add',
- :onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
-
-<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
+
\ No newline at end of file
diff --git a/app/views/forums/show.js.erb b/app/views/forums/show.js.erb
new file mode 100644
index 000000000..9e36215ac
--- /dev/null
+++ b/app/views/forums/show.js.erb
@@ -0,0 +1,2 @@
+$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>")
+$("#pages").html('<%= pagination_links_full @topic_pages, @topic_count,:per_page_links => false,:remote =>true%>');
\ No newline at end of file
diff --git a/app/views/homework_common/_homework_detail_manual_form.html.erb b/app/views/homework_common/_homework_detail_manual_form.html.erb
deleted file mode 100644
index 59294f82d..000000000
--- a/app/views/homework_common/_homework_detail_manual_form.html.erb
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/views/homework_common/_homework_detail_programing_form.html.erb b/app/views/homework_common/_homework_detail_programing_form.html.erb
deleted file mode 100644
index 829905327..000000000
--- a/app/views/homework_common/_homework_detail_programing_form.html.erb
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
- *
- <%= l(:field_name)%>:
-
-
-
-
-
-
- <%= l(:field_quote)%>:
-
- <% if edit_mode %>
- <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
- <% else %>
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
- <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %>
- <% end %>
-
-
-
-
- 附件:
- <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
-
-
-
-
- *
- <%= l(:label_limit_time)%>:
-
-
- <%= calendar_for('homework_end_time')%>
-
-
-
- 发布日期:
-
- <%= calendar_for('homework_publish_time')%>
-
-
-
-
- 迟交扣分:
- <%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
-
- 分
-
-
-
-
-
-
-
编程评测设置
-
-
-
- 开发语言:
- <%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70",:onchange => "homework_language_change($(this));"} %>
-
-
-
-
- 评分比例:
- <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "fl mb10 h26 w70"} %>
- × 教辅评分
- +
-
- × 系统评分
- = 学生得分
-
-
-
-
- 如果教师对学生作品进行了评分,则教师评分为学生最终得分。
-
-
-
-
- 标准代码:
-
-
-
-
- <% if edit_mode %>
- <% homework.homework_tests.each do |homework_test|%>
-
-
- 测试输入:
-
-
-
- 输出:
-
-
-
-
-
- <% if homework_test.result && !homework_test.result.to_s.empty?%>
- <% if homework_test.result == 0%>
- 正确
- <% else%>
- 错误
- <% end%>
- <% else%>
- 测试
- <% end%>
-
-
-
-
- <% end%>
- <% else %>
-
-
- 测试输入:
-
-
-
- 输出:
-
-
-
-
-
- 测试
-
-
-
-
- <% end %>
-
- ">
-
-
-
- 错误信息:
-
-
- <% if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg %>
- <%= homework.homework_tests.first.error_msg%>
- <% end%>
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/views/homework_common/_new_homework_detail_manual_form.html.erb b/app/views/homework_common/_new_homework_detail_manual_form.html.erb
deleted file mode 100644
index 7fb728ad0..000000000
--- a/app/views/homework_common/_new_homework_detail_manual_form.html.erb
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb
new file mode 100644
index 000000000..01d9351ee
--- /dev/null
+++ b/app/views/homework_common/_set_evalutation_att.html.erb
@@ -0,0 +1,53 @@
+
\ No newline at end of file
diff --git a/app/views/homework_common/alert_anonymous_comment.js.erb b/app/views/homework_common/alert_anonymous_comment.js.erb
index 2b3248dc2..1c354aa45 100644
--- a/app/views/homework_common/alert_anonymous_comment.js.erb
+++ b/app/views/homework_common/alert_anonymous_comment.js.erb
@@ -3,5 +3,4 @@ showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("
" +
" ");
-$('#ajax-modal').parent().css("top","").css("left","");
-$('#ajax-modal').parent().addClass("anonymos");
\ No newline at end of file
+$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed");
\ No newline at end of file
diff --git a/app/views/homework_common/edit.html.erb b/app/views/homework_common/edit.html.erb
index 5b65b5982..5fc11728b 100644
--- a/app/views/homework_common/edit.html.erb
+++ b/app/views/homework_common/edit.html.erb
@@ -1,24 +1,24 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
-<%= error_messages_for 'homework_common' %>
-
-
-
- <%= l(:label_course_homework_edit)%>
-
+
+
-
- <%if @homework.homework_type == 2%>
- <%= form_for @homework do |f| %>
- <%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => true } %>
-
提交
- <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
- <% end%>
- <% else %>
- <%= form_for @homework do |f| %>
- <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => true } %>
-
提交
- <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
- <% end%>
- <% end%>
-
+
+
+
+ <%= form_for @homework do |f| %>
+
+
+ <%= render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:f => f,:edit_mode => true } %>
+
+ <% end%>
+
diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb
index bbf4aa343..8799bcab9 100644
--- a/app/views/homework_common/index.html.erb
+++ b/app/views/homework_common/index.html.erb
@@ -25,9 +25,9 @@
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
<% if @is_teacher%>
+ <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
+ <%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %>
<%= homework_anonymous_comment(homework)%>
- <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
- <%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
<% elsif @is_student%>
<%= student_anonymous_comment homework %>
<%= student_new_homework homework %>
@@ -37,7 +37,7 @@
$(function(){if($("#bid_description_<%= homework.id%>_content").height()>360){$("#bid_show_more_des_button<%= homework.id%>").show();}});
-
+
<%= homework.description.html_safe %>
@@ -78,11 +78,7 @@
开发语言:
- <% if homework.homework_detail_programing.language.to_i == 1%>
- C
- <% elsif homework.homework_detail_programing.language.to_i == 2%>
- C++
- <% end%>
+ <%= homework.language_name%>
@@ -98,17 +94,17 @@
<% end%>
-
+
<%= l(:label_end_time)%>:<%= homework.end_time%>
<% if betweentime(homework.end_time) < 0 %>
diff --git a/app/views/homework_common/new.html.erb b/app/views/homework_common/new.html.erb
deleted file mode 100644
index 6fc0fff0e..000000000
--- a/app/views/homework_common/new.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
-<%= error_messages_for 'homework_common' %>
-
-
- <%= l(:label_course_homework_new)%>
-
-
-
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
- <%= hidden_field_tag "course",@course.id%>
- <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
-
提交
- <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
- <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
- <% end%>
-
-
diff --git a/app/views/homework_common/next_step.html.erb b/app/views/homework_common/next_step.html.erb
deleted file mode 100644
index 7ed852fea..000000000
--- a/app/views/homework_common/next_step.html.erb
+++ /dev/null
@@ -1,30 +0,0 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
-<%= error_messages_for 'homework_common' %>
-
-
- <%= l(:label_course_homework_new)%>
-
-
-<% if @homework_type == "1"%>
-
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
- <%= hidden_field_tag "course",@course.id%>
- <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
-
提交
- <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
- <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
- <% end%>
-
-<% elsif @homework_type == "2"%>
-
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
- <%= hidden_field_tag "course",@course.id%>
- <%= hidden_field_tag "homework_common[homework_type]","2"%>
- <%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
-
提交
- <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
- <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
- <% end%>
-
-
-<% end%>
\ No newline at end of file
diff --git a/app/views/homework_common/set_evaluation_attr.js.erb b/app/views/homework_common/set_evaluation_attr.js.erb
new file mode 100644
index 000000000..d6ab73df5
--- /dev/null
+++ b/app/views/homework_common/set_evaluation_attr.js.erb
@@ -0,0 +1 @@
+clickCanel();
\ No newline at end of file
diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb
index 5f27a5b82..b0424bf7a 100644
--- a/app/views/homework_common/start_anonymous_comment.js.erb
+++ b/app/views/homework_common/start_anonymous_comment.js.erb
@@ -1,6 +1,6 @@
<% if @statue == 1%>
alert('启动成功');
-$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "fr mr10 work_edit")%>');
+$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');
<% elsif @statue == 2 %>
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
<% elsif @statue == 3%>
diff --git a/app/views/homework_common/start_evaluation_set.js.erb b/app/views/homework_common/start_evaluation_set.js.erb
new file mode 100644
index 000000000..9d494f908
--- /dev/null
+++ b/app/views/homework_common/start_evaluation_set.js.erb
@@ -0,0 +1,6 @@
+$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att') %>');
+showModal('ajax-modal', '350px');
+$('#ajax-modal').siblings().remove();
+$('#ajax-modal').before("
" +
+" ");
+$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");
\ No newline at end of file
diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb
index 9a6131c64..4725d5731 100644
--- a/app/views/homework_common/stop_anonymous_comment.js.erb
+++ b/app/views/homework_common/stop_anonymous_comment.js.erb
@@ -1,2 +1,2 @@
-$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('
匿评结束 ');
+$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('');
alert('关闭成功');
\ No newline at end of file
diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
index 2643c93e7..ae2a848e0 100644
--- a/app/views/issues/_action_menu.html.erb
+++ b/app/views/issues/_action_menu.html.erb
@@ -3,4 +3,4 @@
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'talk_edit fr' if User.current.allowed_to?(:add_issues, @project) %>
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
<%= link_to l(:button_edit), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %>
-<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>
+<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_journal_kind_reply"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 68bd9f82c..54cb85212 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -6,12 +6,11 @@
* <%= l(:field_status) %>:
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
- <%= f.select :status_id,
- (@allowed_statuses.collect { |p| [p.name, p.id] }),
- {:no_label => true},
- # ajax 刷新
- #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
- :class => "w150" %>
+ <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }),
+ {:no_label => true},
+ # ajax 刷新
+ #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
+ :class => "w150" %>
<% else %>
<%= h(@issue.status.name) %>
<% end %>
@@ -20,10 +19,9 @@
* <%= l(:field_priority) %>:
<% if @issue.safe_attribute? 'priority_id' %>
- <%= f.select :priority_id,
- (@priorities.collect { |p| [p.name, p.id] }),
- {:required => true, :no_label => true}, :disabled => !@issue.leaf?,
- :class => "w150" %>
+ <%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }),
+ {:required => true, :no_label => true}, :disabled => !@issue.leaf?,
+ :class => "w150" %>
<% end %>
@@ -32,8 +30,8 @@
<%= l(:field_assigned_to) %>:
<% if @issue.safe_attribute? 'assigned_to_id' %>
<%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to),
- {:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
- :class => "w150" %>
+ {:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
+ :class => "w150" %>
<% end %>
@@ -41,8 +39,8 @@
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<%= l(:field_fixed_version) %>:
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
- {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
- :class => "w150" %>
+ {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
+ :class => "w150" %>
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
new_project_version_path(@issue.project),
:remote => true,
@@ -60,11 +58,7 @@
<%= l(:field_start_date) %>:
<% if @issue.safe_attribute? 'start_date' %>
- <%= f.text_field :start_date,
- :size => 22,
- :disabled => !@issue.leaf?,
- :no_label => true,
- :required => @issue.required_attribute?('start_date') %>
+ <%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('start_date') %>
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
<% end %>
@@ -72,10 +66,7 @@
<%= l(:field_due_date) %>:
<% if @issue.safe_attribute? 'due_date' %>
- <%= f.text_field :due_date, :size => 22,
- :disabled => !@issue.leaf?,
- :no_label => true,
- :required => @issue.required_attribute?('due_date') %>
+ <%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('due_date') %>
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
<% end %>
@@ -83,10 +74,7 @@
<%= l(:field_estimated_hours) %>:
<% if @issue.safe_attribute? 'estimated_hours' %>
- <%= f.text_field :estimated_hours, :size => 22,
- :disabled => !@issue.leaf?,
- :no_label => true,
- :required => @issue.required_attribute?('estimated_hours') %>
+ <%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
<%= l(:field_hours) %>
<% end %>
@@ -94,9 +82,9 @@
% 完成 :
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
- {:required => @issue.required_attribute?('done_ratio'), :no_label => true},
- :onchange => "PrecentChange(this.value)",
- :class => "w150" %>
+ {:required => @issue.required_attribute?('done_ratio'), :no_label => true},
+ :onchange => "PrecentChange(this.value)",
+ :class => "w150" %>
<% end %>
diff --git a/app/views/issues/_attributes_show.html.erb b/app/views/issues/_attributes_show.html.erb
new file mode 100644
index 000000000..7b9e2bedf
--- /dev/null
+++ b/app/views/issues/_attributes_show.html.erb
@@ -0,0 +1,52 @@
+
+
+ <%= issue_fields_rows do |rows| %>
+
+
+ 优先级 :
<%= @issue.priority.name %>
+
+
+ <% unless @issue.disabled_core_fields.include?('done_ratio') %>
+ % 完成 :
<%= @issue.done_ratio %>%
+
+ <% end %>
+
+
+
+
+ <% unless @issue.disabled_core_fields.include?('due_date') %>
+ 计划完成 :
<%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %>
+
+ <% end %>
+
+ <% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
+ 目标版本 :
<%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %>
+
+ <% end %>
+
+
+ <% end %>
+ <%#= render_custom_fields_rows(@issue) %>
+ <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
+
+
\ No newline at end of file
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 1f3f984b4..f6b41f36d 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -1,3 +1,4 @@
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
<%= error_messages_for 'issue', 'time_entry' %>
<%= render :partial => 'conflict' if @conflict %>
@@ -6,24 +7,20 @@
<%= render :partial => 'form', :locals => {:f => f} %>
-
-
-
-
<% end %>
-
-
<% if @journals.present? %>
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
<% end %>
-
+
+
+
回复
- <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
+ <%= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply' %>
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 41fca87eb..0d5c876f1 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -28,11 +28,7 @@
<% if @issue.safe_attribute? 'subject' %>
* 主题 :
- <%= f.text_field :subject,
- :class => "w576",
- :maxlength => 255,
- :style => "font-size:small",
- :no_label => true %>
+ <%= f.text_field :subject, :class => "w576", :maxlength => 255, :style => "font-size:small", :no_label => true %>
<%= javascript_tag do %>
observeAutocompleteField('issue_subject',
@@ -53,13 +49,7 @@
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
- <%= f.kindeditor :description,:editor_id => "issue_desc_editor",
- # :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
- # :accesskey => accesskey(:edit),
- # :class => "w583",
- :width=>'87%',
- :resizeType => 0,
- :no_label => true %>
+ <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true %>
<%# end %>
<%#= wikitoolbar_for 'issue_description' %>
<% end %>
@@ -68,13 +58,13 @@
- <% if @copy_from && @copy_from.attachments.any? %>
-
+ <%# if @copy_from && @copy_from.attachments.any? %>
+
-
- <% end %>
+
+ <%# end %>
<% if @copy_from && !@copy_from.leaf? %>
<%= l(:label_copy_subtasks) %>
diff --git a/app/views/issues/_form_custom_fields.html.erb b/app/views/issues/_form_custom_fields.html.erb
index 4da98eb13..c97244902 100644
--- a/app/views/issues/_form_custom_fields.html.erb
+++ b/app/views/issues/_form_custom_fields.html.erb
@@ -1,13 +1,13 @@
-
-<% i = 0 %>
-<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
-<% @issue.editable_custom_field_values.each do |value| %>
-
<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>
-<% if i == split_on -%>
-
-<% end -%>
-<% i += 1 -%>
-<% end -%>
-
+
+ <% i = 0 %>
+ <% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
+ <% @issue.editable_custom_field_values.each do |value| %>
+
<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>
+ <% if i == split_on -%>
+
+ <% end -%>
+ <% i += 1 -%>
+ <% end -%>
+
diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb
index 68e991594..8befaf37e 100644
--- a/app/views/issues/_history.html.erb
+++ b/app/views/issues/_history.html.erb
@@ -12,9 +12,9 @@
<% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %>
-
<%= string %>
+ <%= string.html_safe %>
<% end %>
- <% end %>
+ <% end %>
diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb
index efa5750c2..7c56aea6e 100644
--- a/app/views/issues/add_journal.js.erb
+++ b/app/views/issues/add_journal.js.erb
@@ -1,3 +1,3 @@
-$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
+$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
-init_KindEditor_data(<%= @user_activity_id%>);
\ No newline at end of file
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
\ No newline at end of file
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 01cbea1c1..0eb779a23 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -12,6 +12,7 @@
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
+
@@ -20,104 +21,53 @@
-
由<%= @issue.author %>
- <%# if @issue.created_on != @issue.updated_on %>
- 添加于 <%= format_time(@issue.created_on).html_safe %>
- <%# else %>
- <%#= format_time(@issue.updated_on).html_safe %>
- <%# end %>
+ 由<%= @issue.author %> 添加于 <%= format_time(@issue.created_on).html_safe %>
+
'action_menu' %>
-
- <% if @issue.description? || @issue.attachments.any? -%>
+ <% 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 %>
<% end %>
-
-
-
-
-
- <%= issue_fields_rows do |rows| %>
-
-
- 优先级 :
<%= @issue.priority.name %>
-
-
- <% unless @issue.disabled_core_fields.include?('done_ratio') %>
- % 完成 :
<%= @issue.done_ratio %>%
-
- <% end %>
-
-
+
+ <% end -%>
+
+
+
+
+
+ <%= render :partial => 'attributes_show' %>
+
+
+ <%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %>
+
+
+
+
-
-
- <% unless @issue.disabled_core_fields.include?('due_date') %>
- 计划完成 :
<%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %>
-
- <% end %>
-
- <% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
- 目标版本 :
<%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %>
-
- <% end %>
-
-
- <% end %>
- <%#= render_custom_fields_rows(@issue) %>
- <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
-
-
-
- <%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>
-
-
+
<% if @issue.editable? %>
<%= render :partial => 'edit' %>
-
-
-
-
+ <%#--引用时不能修改,剥离出引用内容--%>
+
<%= l(:button_submit) %>
<% end %>
-
<%#= submit_tag l(:button_submit) %>
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
@@ -128,6 +78,7 @@
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>