From 9443c139f0815aa8d436ff174377c8d87eb44fd8 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 18 Sep 2015 17:44:16 +0800 Subject: [PATCH 01/93] update forum --- app/controllers/forums_controller.rb | 85 ++++- app/controllers/memos_controller.rb | 10 +- app/views/forums/_file_form.html.erb | 79 +++++ app/views/forums/_forum_form.html.erb | 15 + app/views/forums/_forum_list.html.erb | 87 ++--- app/views/forums/_forum_tag_list.html.erb | 5 + app/views/forums/_show_topics.html.erb | 64 ++-- app/views/forums/create.js.erb | 1 + app/views/forums/delete_forum_tag.js.erb | 2 + app/views/forums/index.html.erb | 164 +++++++--- app/views/forums/index.js.erb | 1 + app/views/forums/show.html.erb | 144 ++++++--- app/views/forums/show.js.erb | 1 + app/views/layouts/base_forums.html.erb | 178 ++++++----- app/views/layouts/users_base.html.erb | 28 +- app/views/memos/_attachments_links.html.erb | 71 +++++ app/views/memos/_praise_tread.html.erb | 36 +++ app/views/memos/show.html.erb | 297 +++++++----------- app/views/praise_tread/praise_plus.js.erb | 13 +- config/routes.rb | 4 +- public/images/post_portrait.jpg | Bin 0 -> 2360 bytes public/javascripts/forum.js | 101 ++++++ public/stylesheets/images/homepage_icon2.png | Bin 0 -> 11280 bytes public/stylesheets/images/post_image_list.png | Bin 0 -> 3091 bytes public/stylesheets/new_user.css | 72 ++++- .../stylesheets/application.css | 114 +++---- 26 files changed, 1042 insertions(+), 530 deletions(-) create mode 100644 app/views/forums/_file_form.html.erb create mode 100644 app/views/forums/_forum_form.html.erb create mode 100644 app/views/forums/_forum_tag_list.html.erb create mode 100644 app/views/forums/create.js.erb create mode 100644 app/views/forums/delete_forum_tag.js.erb create mode 100644 app/views/forums/index.js.erb create mode 100644 app/views/forums/show.js.erb create mode 100644 app/views/memos/_attachments_links.html.erb create mode 100644 app/views/memos/_praise_tread.html.erb create mode 100644 public/images/post_portrait.jpg create mode 100644 public/javascripts/forum.js create mode 100644 public/stylesheets/images/homepage_icon2.png create mode 100644 public/stylesheets/images/post_image_list.png diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 2b44d51de..112550918 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -7,7 +7,7 @@ class ForumsController < ApplicationController before_filter :find_forum_if_available before_filter :authenticate_user_edit, :only => [:edit, :update] before_filter :authenticate_user_destroy, :only => [:destroy] - before_filter :require_login, :only => [:new, :create] + before_filter :require_login, :only => [:new, :create,:show,:destroy,:update,:edit] helper :sort include SortHelper @@ -97,7 +97,15 @@ class ForumsController < ApplicationController def index @offset, @limit = api_offset_and_limit({:limit => 10}) - @forums_all = Forum.reorder("sticky DESC") + if(params[:reorder_complex]) + @forums_all = Forum.reorder("topic_count #{params[:reorder_complex]},updated_at #{params[:reorder_complex]}") + elsif(params[:reorder_popu]) + @forums_all = Forum.reorder("topic_count #{params[:reorder_popu]}") + elsif(params[:reorder_time]) + @forums_all = Forum.reorder("updated_at #{params[:reorder_time]}") + else + @forums_all = Forum.reorder("topic_count desc,updated_at desc") + end @forums_count = @forums_all.count @forums_pages = Paginator.new @forums_count, @limit, params['page'] @@ -106,6 +114,7 @@ class ForumsController < ApplicationController #@forums = Forum.all respond_to do |format| format.html # index.html.erb + format.js format.json { render json: @forums } end end @@ -113,23 +122,34 @@ class ForumsController < ApplicationController # GET /forums/1 # GET /forums/1.json def show - sort_init 'updated_at', 'desc' - sort_update 'created_at' => "#{Memo.table_name}.created_at", - 'replies' => "#{Memo.table_name}.replies_count", - 'updated_at' => "COALESCE (last_replies_memos.created_at, #{Memo.table_name}.created_at)" - + # sort_init 'updated_at', 'desc' + # sort_update 'created_at' => "#{Memo.table_name}.created_at", + # 'replies' => "#{Memo.table_name}.replies_count", + # 'updated_at' => "COALESCE (last_replies_memos.created_at, #{Memo.table_name}.created_at)" + order = "" + if(params[:reorder_complex]) + order = " last_replies_memos.created_at #{params[:reorder_complex]}, #{Memo.table_name}.created_at #{params[:reorder_complex]}" + elsif(params[:reorder_popu]) + order = "replies_count #{params[:reorder_popu]}" + elsif(params[:reorder_time]) + order = "#{Memo.table_name}.updated_at #{params[:reorder_time]}" + else + order = "last_replies_memos.created_at desc, #{Memo.table_name}.created_at desc" + end @memo = Memo.new(:forum => @forum) @topic_count = @forum.topics.count @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @memos = @forum.topics. # reorder("#{Memo.table_name}.sticky DESC"). - includes(:last_reply). + includes(:last_reply).where("last_replies_memos.parent_id is null and #{Memo.table_name}.parent_id is null"). limit(@topic_pages.per_page). offset(@topic_pages.offset). - order(sort_clause). + reorder(order). preload(:author, {:last_reply => :author}). all @memos + @my_topic_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is null").count + @my_replies_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is not null").count # @offset, @limit = api_offset_and_limit({:limit => 10}) # @forum = Forum.find(params[:id]) # @memos_all = @forum.topics @@ -139,6 +159,7 @@ class ForumsController < ApplicationController # @offset ||= @topic_pages.offset # @memos = @memos_all.offset(@offset).limit(@limit).all respond_to do |format| + format.js format.html { render :layout => 'base_forums' }# show.html.erb @@ -178,7 +199,7 @@ class ForumsController < ApplicationController end #end respond_to do |format| - + format.js format.html { redirect_to @forum, notice: l(:label_forum_create_succ) } format.json { render json: @forum, status: :created, location: @forum } end @@ -186,6 +207,7 @@ class ForumsController < ApplicationController else respond_to do |format| flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}" + format.js format.html { render action: "new" } format.json { render json: @forum.errors, status: :unprocessable_entity } end @@ -199,10 +221,12 @@ class ForumsController < ApplicationController respond_to do |format| if @forum.update_attributes(params[:forum]) + format.js {render :text=> true} format.html { redirect_to @forum, notice: l(:label_forum_update_succ) } format.json { head :no_content } else flash.now[:error] = "#{l :label_forum_update_fail}: #{@forum.errors.full_messages[0]}" + format.js { render :text=> false} format.html { render action: "edit" } format.json { render json: @forum.errors, status: :unprocessable_entity } end @@ -261,6 +285,47 @@ class ForumsController < ApplicationController end end + #检查forum的名字 + def check_forum_name + forum_name_exist = Forum.where("name = '#{params[:forum_name]}'").count >= 1 ? true : false + render :text => forum_name_exist + end + + #添加论坛tag + def add_forum_tag + @forum = Forum.find(params[:id]) + unless @forum.nil? + @forum.tag_list.add(params[:tag_str].split(',')) + @forum.save + end + respond_to do |format| + format.js {render :delete_forum_tag} + end + end + + #删除forum的tag + def delete_forum_tag + @tag_id = (ActsAsTaggableOn::Tag.find_by_name(params[:tag_name])).id + #forum的taggable_type = 5 + @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,params[:id],'Forum') + + unless @taggings.nil? + @taggings.delete + end + + # 是否还有其他记录 引用了 tag_id + @tagging = ActsAsTaggableOn::Tagging.find_by_tag_id(@tag_id) + # 如果taggings表中记录已经不存在 ,那么检查tags表 作删除动作 + if @tagging.nil? + @tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id) + @tag.delete unless @tag.nil? + end + @forum = Forum.find(params[:id]) + respond_to do |format| + format.js + end + end + private def find_forum_if_available diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 27e0d472f..e354a3293 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -11,7 +11,7 @@ class MemosController < ApplicationController include AttachmentsHelper include ApplicationHelper - layout 'base_memos' + # layout 'base_memos' def quote @subject = @memo.subject @@ -103,7 +103,7 @@ class MemosController < ApplicationController offset(@reply_pages.offset). all if @memo.new_record? - format.html { render :new,:layout=>'base'} + format.html { render :new,:layout=>'base_forums'} else format.html { render action: :show } format.json { render json: @memo.errors, status: :unprocessable_entity } @@ -115,6 +115,7 @@ class MemosController < ApplicationController REPLIES_PER_PAGE = 20 unless const_defined?(:REPLIES_PER_PAGE) def show + # 更新贴吧帖子留言对应的memo_messages的viewed字段 unless @memo.children.blank? @memo.children.each do |child| @@ -154,14 +155,15 @@ class MemosController < ApplicationController @memo_new = Memo.new - + @my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count + @my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count # @memo = Memo.find_by_id(params[:id]) # @forum = Forum.find(params[:forum_id]) # @replies = @memo.replies # @mome_new = Memo.new respond_to do |format| - format.html # show.html.erb + format.html {render :layout=> 'base_forums'}#:layout=> 'base_forums', format.json { render json: @memo } format.xml { render xml: @memo } 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..28bb3fa83 --- /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/_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..9c39c436e 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.memo_count), forum_path(forum),:class=>"linkGrey5 fb" %> +
+
帖子
+
+
+
+
+ + <%= link_to (forum.topic_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..156bcc895 --- /dev/null +++ b/app/views/forums/_forum_tag_list.html.erb @@ -0,0 +1,5 @@ +<% forum.tag_list.each do |tag|%> + + <%= tag %> + × +<% 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..0457bde55 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%> +
最后回复:<%= author.name%>
+
<%= 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..a120008b6 --- /dev/null +++ b/app/views/forums/create.js.erb @@ -0,0 +1 @@ +$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); \ 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/index.html.erb b/app/views/forums/index.html.erb index 85cab957a..6e1a26407 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -1,48 +1,118 @@ -<% @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 %> - - -
- - <%= 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 %> + + +
+
+
+ + +
+ <%= render :partial => 'forum_list',:locals => {:forums=>@forums}%> +
+ + +
+
+
+
diff --git a/app/views/forums/index.js.erb b/app/views/forums/index.js.erb new file mode 100644 index 000000000..f8f7f45b8 --- /dev/null +++ b/app/views/forums/index.js.erb @@ -0,0 +1 @@ +$("#forum_list").html("<%= escape_javascript(render :partial => 'forum_list',:locals => {:forums=>@forums}) %>"); \ No newline at end of file diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 24aa74c23..d72d15df0 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,42 +1,104 @@ - -
-

- <%=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 %> + +
+ + +
+ <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%> +
+ + + + + + + + + + + +
- - - <%= 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..2cd380aca --- /dev/null +++ b/app/views/forums/show.js.erb @@ -0,0 +1 @@ +$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>") \ No newline at end of file diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index c68e917f5..3646ae019 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -7,7 +7,7 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application','prettify', 'nyan', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', 'nyan','leftside', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' ,'prettify' %> @@ -15,7 +15,56 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - <%= stylesheet_link_tag 'base','header', :media => 'all'%> + <%= stylesheet_link_tag 'base','header','new_user', :media => 'all'%> + @@ -28,82 +77,65 @@ <% end%>
+
+
+
+
+
<%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %> + +
+ +
+ +
+
+ <%= render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum}%> +
+ + 添加标签 +
+
+
+
+
<%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path( User.current) %>
+
我在贴吧
+
+
+ +
+
+ +
发帖
+
-
-
-
-
-
- - - - - - - - - - -
<%= l(:label_projects_community)%><%= l(:label_user_location) %> : - -
<%= link_to request.host()+"/forums", forums_path %>

<%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %>

-
- -
+
+
+
+
+ + <%= yield %> + <%#= call_hook :view_layouts_base_content %> +
+
+
- <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
- -
- <%#= render :partial => 'layouts/base_footer'%> -
- - -
-
-
<%= render :partial => 'layouts/footer' %>
- <%= call_hook :view_layouts_base_body_bottom %> + <%#= call_hook :view_layouts_base_body_bottom %> diff --git a/app/views/layouts/users_base.html.erb b/app/views/layouts/users_base.html.erb index 0caa5e39b..6c1edbd1b 100644 --- a/app/views/layouts/users_base.html.erb +++ b/app/views/layouts/users_base.html.erb @@ -7,16 +7,16 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application', 'nyan','prettify', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> - <%= javascript_include_tag "jquery.leanModal.min" ,'prettify'%> + <%= javascript_include_tag "jquery.leanModal.min" ,'prettify','avatars'%> <%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%> <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - <%= stylesheet_link_tag 'base','header', :media => 'all'%> + <%= stylesheet_link_tag 'base','header','new_user' ,:media => 'all'%>
@@ -29,27 +29,27 @@
-
-
-
- <%#=render :partial => 'layouts/base_header'%> -
-
+ + + + + + <%= render_flash_messages %> <%= yield %> <%= call_hook :view_layouts_base_content %>
-
+ -
-
+ + -
-
+ +
<%= render :partial => 'layouts/footer' %> diff --git a/app/views/memos/_attachments_links.html.erb b/app/views/memos/_attachments_links.html.erb new file mode 100644 index 000000000..7da30aad0 --- /dev/null +++ b/app/views/memos/_attachments_links.html.erb @@ -0,0 +1,71 @@ +
+ <% for attachment in attachments %> + + + + <% if options[:length] %> + + <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true,:length => options[:length] -%> + (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + <% if options[:deletable] %> + <%#= 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_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 32 -%> + (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + <% if options[:deletable] %> + <%#= 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 %> +
+ <% end %> + + <% if attachment.is_text? %> + <%= link_to image_tag('magnifier.png'), + :controller => 'attachments', + :action => 'show', + :id => attachment, + :filename => attachment.filename%> + <% end %> + + + + + + + + + + + <%#= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %> + + + + + <% end %> + <% if defined?(thumbnails) && thumbnails %> + <% images = attachments.select(&:thumbnailable?) %> + <% if images.any? %> +
+ <% images.each do |attachment| %> +
<%= thumbnail_tag(attachment) %>
+ <% end %> +
+ <% end %> + <% end %> +
diff --git a/app/views/memos/_praise_tread.html.erb b/app/views/memos/_praise_tread.html.erb new file mode 100644 index 000000000..17af4b090 --- /dev/null +++ b/app/views/memos/_praise_tread.html.erb @@ -0,0 +1,36 @@ + + <% if User.current.logged? %> + <% if horizontal %> + +
+ <% @is_valuate = is_praise_or_tread(obj,user_id)%> + <% if @is_valuate.size > 0 %> + <% @flag = @is_valuate.first.praise_or_tread %> + <% if @flag == 1 %> + <%= get_praise_num(obj)%> + <% end %> + <% else %> + <% if user_id == obj.author_id %> + + + <%= get_praise_num(obj)%> + + <% else %> + + <%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %> + + <%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)), + :controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %> + <%= get_praise_num(obj)%> + + + + + + + + <% end %> + <% end %> +
+ <% end %> + <% end %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 586279504..109964182 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -1,188 +1,115 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","forum" %> -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> -
- - - <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> - -
-
- <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %> -
-

- <%=link_to @memo.author.name, user_path(@memo.author) %> -

-
-
-
- - <%= link_to( - l(:button_quote), - {:action => 'quote', :id => @memo}, - :remote => true, - :method => 'get', - :title => l(:button_quote) - )if !@memo.locked? && User.current.logged? %> - - <%= link_to( - #image_tag('edit.png'), - l(:button_edit), - {:action => 'edit', :id => @memo}, - :method => 'get', - :title => l(:button_edit) - ) if @memo.editable_by?(User.current) %> - - <%= link_to( - l(:button_delete), - {:action => 'destroy', :id => @memo}, - :method => :delete, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete) - ) if @memo.destroyable_by?(User.current) %> -
- -
 
- -
- <%= label_tag l(:field_subject) %>: - <%=h @memo.subject %> -
-
- <%= @memo.content.html_safe %> -

- <% if @memo.attachments.any?%> - <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> - <%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %> - <% end %> -

-
-
-
- <%= authoring @memo.created_at, @memo.author %> -
- -
-
-
-
-

<%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)

- <% pages_count = @reply_pages.offset %> - <% @replies.each do |reply| %> -
"> -

-
- - <%= link_to( - l(:button_quote), - {:action => 'quote', :id => reply}, - :remote => true, - :method => 'get', - :title => l(:button_quote) - )if !@memo.locked? && User.current.logged? %> - - <%= link_to( - #image_tag('edit.png'), - l(:button_edit), - {:action => 'edit', :id => reply}, - :title => l(:button_edit) - ) if reply.editable_by?(User.current) %> - - <%= link_to( - l(:button_delete), - {:action => 'destroy', :id => reply}, - :method => :delete, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete) - ) if reply.destroyable_by?(User.current) %> - -
-
- - - - - - - - -
- <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> - -
- <%=h sanitize(reply.content.html_safe) %> -
-

- <% if reply.attachments.any?%> - <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> - <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options, :is_float => true} %> - <% end %> -

-
- <%= authoring reply.created_at, reply.author %> -
-
- <% end %> - -
- -<% if User.current.login? %> -
- <%= render :partial => 'reply_box' %> -
-<% else %> -
- <%= l(:label_user_login_tips) %> - <%= link_to l(:label_user_login_new), signin_path %> -
-
-<% end %> - - - +
+
+
+ <%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %> +
+
+ + +
<%= format_date( @memo.created_at)%>
+ + <%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> + +
+
+ <%= @memo.content.html_safe%> +
+
+
+ <% if @memo.attachments.any?%> + <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> + <%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %> + <% end %> +
+
+
+
+
+
+
+ <%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f|%> + <%= f.hidden_field :subject, :required => true, value: @memo.subject %> + <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> + <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> + +

+
+ 取消 + 留言 + <% end%> +
+
+ <% @replies.each do |reply| %> +
+
+ + <%= link_to image_tag(url_to_avatar(reply.author), :width => 45,:height => 45), user_path(reply.author) %> +
+
+
<%= reply.author.name%> + <% if reply.parent && reply.parent.id != @memo.id%> + 回复<%= reply.parent.author.name%> + <% end %> + + <%= format_date(reply.created_at)%> + + <%= link_to( + l(:button_delete), + {:action => 'destroy', :id => reply}, + :method => :delete, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete),:class=>'replyGrey fr ml10' + ) if reply.destroyable_by?(User.current) %> + 回复
+
<%= reply.content.html_safe%>
+ +
+
+
+
+ <% end %> + + + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/app/views/praise_tread/praise_plus.js.erb b/app/views/praise_tread/praise_plus.js.erb index d56ff0e68..30a53723e 100644 --- a/app/views/praise_tread/praise_plus.js.erb +++ b/app/views/praise_tread/praise_plus.js.erb @@ -1,4 +1,9 @@ - -$('#praise_tread_<%= @obj.id %>').html('<%= j( -render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal} -)%>'); +<% if @obj_type == 'Memo'%> + $('#praise_tread_<%= @obj.id %>').html('<%= j( + render :partial => "/memos/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal} + )%>'); +<% else %> + $('#praise_tread_<%= @obj.id %>').html('<%= j( + render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal} + )%>'); +<% end %> diff --git a/config/routes.rb b/config/routes.rb index 1d2393764..2c6ab37ce 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -220,12 +220,14 @@ RedmineApp::Application.routes.draw do resources :forums do collection do match 'search_forum', :via => [:get, :post] - + match 'check_forum_name',:via => [:get] end member do post 'create_memo' post 'create_feedback' match 'search_memo', :via => [:get, :post] + match 'delete_forum_tag',:via =>[:get] + match 'add_forum_tag',:via=>[:get] end resources :memos do collection do diff --git a/public/images/post_portrait.jpg b/public/images/post_portrait.jpg new file mode 100644 index 0000000000000000000000000000000000000000..91ea6214690d8fa94bcc7f874be009f88102ac72 GIT binary patch literal 2360 zcma)63sh5A7JW$wMCBKL3Q`OSA}Az00>K0$hJ+wW6c8)6hz-dTBIHBzfRHE(I2GhS zd}JI{iX9QDbr7luWdsCKRD{-11XPfb!QrDI)sCR)3-WQTDYJUkduyG0?%DgCd+)wi z)1~PLR`@7I`vAbtZ!LfW7ECh&;5o5^s0087=pbPs0BHI#>mp%T#-LCn3Nl|P4Ts1A zshFbV%P1h(g#v8wQp)&(C`3qs%^mn zRg{1(BzkQmY)~?kVwo6%`2?jnTB2YmnZy}#2I6bO6e3|J1&(48S=y?E5MBU*EtNwA zcQVyk-~xgK8jTFPxzlK%6T#I5bfvf;AI%wbW4O~8t{#M0BO=x0!hMV&4tKT|GGY>E z7Zo2LPmZUOrSb?0NT<`a9Imd;NQSc_K?3uY&JqP_j)4Oy1agrK7D*)pEh9f%8VfUt zNT(l{AePP3{_b9VlE~xz|5UM9y8$z_3OEQ_==XPt6~PHIh!O-Tq_J`Vgrt+SU>Sog zhxo8m9xRnc&+TGBq!gAaBBe3{dk2l+uuCKnO5+udGxUy6!EJrGc6+;qu4l7*1x-N>G(0v-8O#eG zk|1iABeK?v0fsYT1%wUA^+9QRfFl6vj~jZyF!MGGN25^4Eb`A!{82~K0N`=JR$waz zg$K}h6b6sdGy?~aJC4%9pcZaFf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#!=iO7)u~pqfVZ^ z$FIdTUimdgpZ7u5bIXe1qs-yJd;vY`^|i)xb^87!$gj962HT2?3KxO&A{vuKyUe@` z;bk5np|Y|`?-XjRS84s_F7*9dHBo*GUEv1Du216KC<;aA6dB}!viN(p;xY>1;YL!; zGw56;M{6CV>`7QkA_Te&8F_Z&WQ4h_t=st1D{BBX#v%hfZ@LXTrSj{?6JN}SYen>i z#nm;Nj53}1(}%`rZ0P#ai%^}!C4XmEFxySKuo zo=(C}$k+<%uFJ-fE=JZH{&D@e6F%0*Sco#rOarbaI;UJDid0@AG)xdW8cLO_I`hF; zPAG2AW>3m+u$wecM@pG`RFzd!WM-fFMM!HFwO_Nl@_CshH9-RY2Qu3-<6sx9LO0YGYvP8(`Kr)SpNzY`Y zf20nh3YPBcf95a$?M;D2bXEfS8`KSsFcg)VisNLL+SdQ}CXMIt$iE!jRJwTVv6sv~ zIvnk|ND-;6n#C(T?0VA%Q(?;wM|a98l6@!qG+jkC%U(Rg{zxO0T>*B9$X660(!;`C zIS3GPX?h(w8pgi6xgG&lh$Ay~I1(A8%)`cxwNtU)>UOl|9ZvQyefESpD*4Y;V-Is= zb*XECGrAq0mdlLdOfjV1h}(n;UzP6EOHnyxpzT>#x1-zyPODen=b0}fVjpau3QO8Z zkH!#P=qvO(!omdlQuG&!Whj4%u24OB))w!R1MMVeVJ60RlxeyVMvg^}B0}EvCzlOO zYd@pHcYM+9P1OHwTo3=p$y%&NgVvEPCHuZJI&J~Tkb84)xls`U8=6-=TBYdkVpMaf zdiG=pPd8SGf@4Dih6>HXPN1bOER-X(?9ATfhEa=^sYC literal 0 HcmV?d00001 diff --git a/public/stylesheets/images/post_image_list.png b/public/stylesheets/images/post_image_list.png new file mode 100644 index 0000000000000000000000000000000000000000..86aab4c79da00af1cc7655a2d53013c233b13ae4 GIT binary patch literal 3091 zcmaJ@dpy%^8=qs&r2{5q4NuZW8wzNarm_t~U3ONp?L=q}lkwXYi z2O@`(Lr4xGkHZ`~Nb-26r+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T|7f2Zy5GL*x8?yG9m+=-fyMSGqY0BH0!B;VY%aP^vwv$n?; IS$aqQ2l)VA5&!@I literal 0 HcmV?d00001 diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 51bd52547..ce1af9cd0 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -177,6 +177,25 @@ a.buttonBlue:hover {background-color:#297fb8;} a.linkGrey {color:#484848;} a.linkGrey:hover {color:#269ac9;} +a.bBlue {background-color:#3498db;} +a.bBlue:hover {background-color:#297fb8;} +.fontGrey {color:#cecece;} +.fontGrey2 {color:#888888;} +a.linkBlue2 {color:#3498db;} +a.linkBlue2:hover {color:#297fb8;} +a.linkOrange {color:#ff7143;} +a.linkGrey2 {color:#888888;} +a.linkGrey2:hover {color:#484848;} +a.linkGrey4 {color:#484848;} +a.linkGrey5 {color:#484848;} +a.linkGrey5:hover {color:#3498db;} +a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} +a.submit_btn:hover {background-color:#3498db; color:#ffffff;} +input.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} +input.submit_btn:hover {background-color:#3498db; color:#ffffff;} +a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} + + /* commonBtn */ .grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} a.grey_btn{ background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;} @@ -485,7 +504,7 @@ a:hover.UsersApBtn{border:1px solid #888888; } .homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 0px;} .homepageSignature {font-size:12px; color:#888888; margin:10px 0; width:208px;} .homepageImageBlock {margin:0 auto; width:68px; float:left; text-align:center; display:inline-block;} -a.homepageImageNumber {font-size:12px; color:#484848; font-weight: bold;} +a.homepageImageNumber {font-size:12px; font-weight: bold;} /*color:#484848;*/ a.homepageImageNumber:hover {color:#269ac9;} .homepageImageText {font-size:12px; color:#888888;} .homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} @@ -683,6 +702,57 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} .AgreementTxt{text-indent: 2em; margin-bottom: 15px;} .AgreementImg{margin: 0px auto; width: 820px;} + +/*创建贴吧样式*/ +.postContainer {width:968px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; margin-top:15px;} +.postBanner {height:30px; width:970px; border-bottom:1px solid #efefef;} +.postSort {width:40px; float:left; margin-top:5px; padding-left:5px;} +a.sortArrowDown {background:url(images/post_image_list.png) 0px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;} +a.sortArrowUp {background:url(images/post_image_list.png) -17px 0px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;} +a.sortArrowActiveD {background:url(images/post_image_list.png) -0px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;} +a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:5px;} +.creatPost {width:80px; height:25px; border-radius:3px; color:#ffffff; text-align:center; float:right; line-height:25px; vertical-align:middle; margin-top:2px;} +.creatPostIcon {background:url(images/post_image_list.png) -40px -54px no-repeat; width:70px; height:25px; padding-left:10px; border-radius:3px;} +.postRow {width:970px; border-bottom:1px solid #efefef; padding:15px 0;} +.postPortrait {width:75px; height:75px; float:left; margin-right:15px;} +.postWrap {width:690px; float:left; margin-right:95px;} +.postTitle {width:690px; max-width:690px; margin-bottom:5px;} +.postDes {width:690px; max-width:690px; margin-bottom:6px; color:#484848;} +.postCreater {color:#888888; font-size:12px; float:left; margin-right:40px;} +.postDate {color:#888888; font-size:12px;} +.postStatics { margin-top:28px; color:#888888; float:right;} +.slice {width:1px; height:25px; background-color:#d1d1d1; float:right; margin-top:35px; margin-right:20px;} +.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;} +.pageCell {border:1px solid #dddddd; border-width:1px 1px 1px 0px; padding:5px 12px; float:left; border-spacing:0px;} +.pageCellActive {background-color:#3498db;} +.postCreateInput {width:963px; height:28px; border:1px solid #d9d9d9 !important; outline:none;} +.upImg {padding:1px 6px; border: 1px solid #dddddd; margin-top:53px;} + +/*贴吧内部样式*/ +.postDetailContainer {padding:15px; border:1px solid #dddddd; background-color:#ffffff;} +.postlabel {background-color:#edf1f2; color:#888888; padding:2px 5px; float:left; margin-bottom:5px;} +.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left;} /* margin-top:15px;*/ +.postDetailBanner {height:30px; width:720px; border-bottom:1px solid #efefef;} +.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;} +.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;} +.postDetailWrap {width:580px; float:left;} +.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} +.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;} +.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} +.postDetailDate {color:#888888; font-size:12px; float:left;} +.postDetailReply { margin-top:28px; color:#888888; float:right;} +a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left;} +a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat;} +.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;} +.postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;} +.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;} +.postThemeContainer {width:720px;} +.postThemeWrap {width:655px; float:left;} +.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px;} +.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;} +a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;} + /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 93ad4c008..5a9ea3830 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -848,16 +848,16 @@ p.breadcrumb text-indent:15px } -input[type="text"],input[type="password"],textarea,select -{ - padding:2px; - border:1px solid #039ea0 -} +/*input[type="text"],input[type="password"],textarea,select*/ +/*{*/ + /*padding:2px;*/ + /*border:1px solid #039ea0*/ +/*}*/ -input[type="text"],input[type="password"] -{ - padding:3px -} +/*input[type="text"],input[type="password"]*/ +/*{*/ + /*padding:3px*/ +/*}*/ input[type="text"]:focus,input[type="password"]:focus,textarea:focus,select:focus { @@ -1719,57 +1719,57 @@ a.enterprise { cursor: pointer; } -input.enterprise[type="button"] { - padding-bottom: 5px; - width: 55px; - height: 25px; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 12px; - color: #fff; - padding: 0px; - background: #15bccf; - border: 1px solid #15bccf; -} -input.enterprise[type="submit"] { - padding-bottom: 5px; - width: 55px; - height: 25px; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 12px; - color: #fff; - padding: 0px; - background: #15bccf; - border: 1px solid #15bccf; +/*input.enterprise[type="button"] {*/ + /*padding-bottom: 5px;*/ + /*width: 55px;*/ + /*height: 25px;*/ + /*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/ + /*font-size: 12px;*/ + /*color: #fff;*/ + /*padding: 0px;*/ + /*background: #15bccf;*/ + /*border: 1px solid #15bccf;*/ +/*}*/ +/*input.enterprise[type="submit"] {*/ + /*padding-bottom: 5px;*/ + /*width: 55px;*/ + /*height: 25px;*/ + /*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/ + /*font-size: 12px;*/ + /*color: #fff;*/ + /*padding: 0px;*/ + /*background: #15bccf;*/ + /*border: 1px solid #15bccf;*/ -} +/*}*/ /*end*/ -input[type="submit"] { - width: auto; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 12px; - color: rgb(5, 5, 5); - padding: 0px; - background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent; - border-radius: 4px; - border: 1px solid rgb(148, 148, 148); - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255); - cursor: pointer; -} +/*input[type="submit"] {*/ + /*width: auto;*/ + /*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/ + /*font-size: 12px;*/ + /*color: rgb(5, 5, 5);*/ + /*padding: 0px;*/ + /*background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;*/ + /*border-radius: 4px;*/ + /*border: 1px solid rgb(148, 148, 148);*/ + /*box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;*/ + /*text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);*/ + /*cursor: pointer;*/ +/*}*/ -input[type="button"] { - width: auto; - font-family: '微软雅黑',Arial,Helvetica,sans-serif; - font-size: 12px; - color: rgb(5, 5, 5); - padding: 0px; - background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent; - border-radius: 4px; - border: 1px solid rgb(148, 148, 148); - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255); - cursor: pointer; -} +/*input[type="button"] {*/ + /*width: auto;*/ + /*font-family: '微软雅黑',Arial,Helvetica,sans-serif;*/ + /*font-size: 12px;*/ + /*color: rgb(5, 5, 5);*/ + /*padding: 0px;*/ + /*background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent;*/ + /*border-radius: 4px;*/ + /*border: 1px solid rgb(148, 148, 148);*/ + /*box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;*/ + /*text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);*/ + /*cursor: pointer;*/ +/*}*/ /*by fanqiang*/ img.avatar3 { width: 50px; From da2b027f0409d45178cec11c327668dc4c2d4436 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 09:24:36 +0800 Subject: [PATCH 02/93] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 109964182..b03127247 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -51,7 +51,7 @@

取消 留言 - <% end%> + <% end %>
<% @replies.each do |reply| %> @@ -80,9 +80,9 @@
- + <%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index d72d15df0..f56006db9 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -79,7 +79,7 @@ <% end %>
- + From b621449406fd5578a90f0145f83de1a36a3ca041 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 10:00:46 +0800 Subject: [PATCH 05/93] =?UTF-8?q?=E5=B8=96=E5=AD=90=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 2 +- app/views/memos/show.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index e354a3293..9922aabbe 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -229,7 +229,7 @@ class MemosController < ApplicationController end def back_memo_url - forum_memo_path(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)) + forum_memo_path(@forum, (@memo.root.nil? ? @memo : @memo.root)) end def back_memo_or_forum_url diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index b03127247..a733da7c5 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -80,9 +80,9 @@ -
- - - - -
+
+ <%= render :partial => 'post_banner' ,:locals => {:order_type=>@type,:order_str=>@str}%> + + + + + +
<%= render :partial => 'forum_list',:locals => {:forums=>@forums}%>
- diff --git a/app/views/forums/index.js.erb b/app/views/forums/index.js.erb index f8f7f45b8..642c3c20a 100644 --- a/app/views/forums/index.js.erb +++ b/app/views/forums/index.js.erb @@ -1 +1,4 @@ -$("#forum_list").html("<%= escape_javascript(render :partial => 'forum_list',:locals => {:forums=>@forums}) %>"); \ No newline at end of file +//$("#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 f56006db9..ee3679241 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -88,7 +88,7 @@
<%= render :partial => 'show_topics',:locals => {:memos=>@memos}%>
- + diff --git a/app/views/forums/show.js.erb b/app/views/forums/show.js.erb index 2cd380aca..9e36215ac 100644 --- a/app/views/forums/show.js.erb +++ b/app/views/forums/show.js.erb @@ -1 +1,2 @@ -$("#topics_list").html("<%= escape_javascript(render :partial => 'show_topics',:locals => {:memos=>@memos})%>") \ No newline at end of file +$("#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/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 812873045..752853c60 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -5,7 +5,7 @@
  • 服务协议|
  • <%= l(:label_surpport_group)%>|
  • -
  • <%= l(:label_forums)%>
  • +
  • <%= l(:label_forums)%>
  • From acbbd0d7beed6b0ec846fc2a4959da601e04543c Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 12:40:07 +0800 Subject: [PATCH 12/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=8F=8F=E8=BF=B02=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_forum_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index 9c39c436e..a17314173 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -10,7 +10,7 @@ <%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %>
    -
    描述<%= textAreailizable forum.description%>
    +
    <%= textAreailizable forum.description%>
    From 604e7ca56d99c94fe568eaab1c92680291b9d23d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 12:49:25 +0800 Subject: [PATCH 13/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=88=90=E5=8A=9F=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=20=E4=B9=9F=E6=B2=A1=E6=9C=89=E7=BB=99=E5=87=BA=E4=BB=BB?= =?UTF-8?q?=E4=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/index.html.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 6c718b102..75d6db2c8 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -50,14 +50,18 @@ }); function check_and_submit(doc){ $("#error").hide(); - if( $("input[name='forum[name]']").val().trim == "" || $("input[name='forum[description]']").val().trim == ""){ + if( check_pass == false){ + $("#error").html("贴吧名称已经存在").show(); + return; + } + if( $("input[name='forum[name]']").val().trim == "" || $("input[name='forum[description]']").val().trim == "" || check_pass == false){ $("#error").html("名称和描述未填写正确").show(); return; }else{ doc.parent().parent().submit(); } } - + var check_pass = true; function check_forum_name(){ name = $("input[name='forum[name]']").val().trim(); if( name != ""){ @@ -68,6 +72,7 @@ if( data == 'true'){ $("#error").html("贴吧名称已经存在").show(); + check_pass = false; } } ); From cddb3deb3569d0d6a6b2cc697ac9a4590e198004 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 13:43:59 +0800 Subject: [PATCH 14/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=88=90=E5=8A=9F=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=20=E4=B9=9F=E6=B2=A1=E6=9C=89=E7=BB=99=E5=87=BA=E4=BB=BB?= =?UTF-8?q?=E4=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/index.html.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 75d6db2c8..e42334286 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -49,12 +49,9 @@ }); }); function check_and_submit(doc){ - $("#error").hide(); - if( check_pass == false){ - $("#error").html("贴吧名称已经存在").show(); - return; - } - if( $("input[name='forum[name]']").val().trim == "" || $("input[name='forum[description]']").val().trim == "" || check_pass == false){ + $("#error").html('').hide(); + check_forum_name(); + if( $("input[name='forum[name]']").val().trim() == "" || $("input[name='forum[description]']").val().trim() == "" ){ $("#error").html("名称和描述未填写正确").show(); return; }else{ @@ -63,6 +60,7 @@ } var check_pass = true; function check_forum_name(){ + check_pass = true; name = $("input[name='forum[name]']").val().trim(); if( name != ""){ $.get( From 11714868b7b155adf963f13f868e2a307b526446 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 13:47:00 +0800 Subject: [PATCH 15/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=88=90=E5=8A=9F=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=20=E4=B9=9F=E6=B2=A1=E6=9C=89=E7=BB=99=E5=87=BA=E4=BB=BB?= =?UTF-8?q?=E4=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forums_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 82754810c..415321655 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -207,6 +207,7 @@ class ForumsController < ApplicationController # Author lizanle # Description after save后需要进行资源记录的更新 # owner_type = 2 对应的是 forum + @save_flag=true if params[:asset_id] ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids ,@forum.id,OwnerTypeHelper::FORUM @@ -219,6 +220,7 @@ class ForumsController < ApplicationController end else + @save_flag=false respond_to do |format| flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}" format.js From 67fe8de89758f366274c428389d824f1966e6c41 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 19 Sep 2015 13:47:27 +0800 Subject: [PATCH 16/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=88=90=E5=8A=9F=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=20=E4=B9=9F=E6=B2=A1=E6=9C=89=E7=BB=99=E5=87=BA=E4=BB=BB?= =?UTF-8?q?=E4=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/create.js.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb index 45179a4b3..0b6033441 100644 --- a/app/views/forums/create.js.erb +++ b/app/views/forums/create.js.erb @@ -1,2 +1,5 @@ +<%if @save_flag%> $('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); -$('#reorder_time').click(); \ No newline at end of file +$('#reorder_time').click(); +<%else%> +<%end %> \ No newline at end of file From 52b4cba582462a39451a209f18ea3a47267b1cdc Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Sep 2015 09:59:41 +0800 Subject: [PATCH 17/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=90=8D=E7=A7=B0=20?= =?UTF-8?q?=E5=92=8C=E6=8F=8F=E8=BF=B0=E8=BE=93=E5=85=A5=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E8=87=AA=E9=80=82=E5=BA=94=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/index.html.erb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index e42334286..87fa0657f 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -1,3 +1,4 @@ +<%= javascript_include_tag 'new_user' %>
    - + +
    From a958a879ad357cd7297476a10d9676f8c4c26f9c Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Sep 2015 10:04:41 +0800 Subject: [PATCH 18/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E5=8A=9F=E7=9A=84=E6=97=B6=E5=80=99=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E7=BB=99=E4=B8=AA=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/create.js.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb index 0b6033441..be99d724a 100644 --- a/app/views/forums/create.js.erb +++ b/app/views/forums/create.js.erb @@ -2,4 +2,5 @@ $('#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 From a24ca05157a58c6afab59a814db95ba6b83ba44b Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Sep 2015 10:31:15 +0800 Subject: [PATCH 19/93] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E7=9A=84=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E4=BF=AE=E6=94=B9=E7=9A=84=E5=9B=BE=E6=A0=87=20?= =?UTF-8?q?=E5=92=8C=20=E5=88=A0=E9=99=A4=E6=A0=87=E7=AD=BE=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=9A=84=E6=98=BE=E7=A4=BA=E9=9A=90=E8=97=8F?= =?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/views/forums/_forum_tag_list.html.erb | 2 ++ app/views/layouts/base_forums.html.erb | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/forums/_forum_tag_list.html.erb b/app/views/forums/_forum_tag_list.html.erb index 156bcc895..c0efbe4b9 100644 --- a/app/views/forums/_forum_tag_list.html.erb +++ b/app/views/forums/_forum_tag_list.html.erb @@ -1,5 +1,7 @@ <% forum.tag_list.each do |tag|%> + <% end %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index ce5062fce..a03a23e7f 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -94,10 +94,13 @@
    -
    <%= @forum.description%> - - <%= image_tag('signature_edit.png',{:width=>12,:height=>12})%> - +
    <%= @forum.description%> + <%if @forum.creator.id == User.current.id%> + + + <%= image_tag('signature_edit.png',{:width=>12,:height=>12})%> + + <%end%>
    From 70357683f763afd806bd45f495583adf3efd3de8 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Sep 2015 14:51:06 +0800 Subject: [PATCH 20/93] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=A1=B9=E7=9B=AE=E9=82=AE=E4=BB=B6=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/mailer/applied_project.html.erb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/mailer/applied_project.html.erb b/app/views/mailer/applied_project.html.erb index 4f266e6ce..eb49c35b9 100644 --- a/app/views/mailer/applied_project.html.erb +++ b/app/views/mailer/applied_project.html.erb @@ -1,5 +1,11 @@ -<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %> -
    - -

    <%= link_to(h(@project.name), @applied_url) %>

    +
    +
      +
    • <%= l(:mail_issue_content)%> + +

      <%=link_to @user.show_name, user_url(@user) %> 申请加入项目:<%=link_to @project.name, @applied_url %>

      +
      +
    • +
    +
    +
    From b70104cee819082d2dda69ff7b88c4e8bc3ebf5d Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Sep 2015 14:54:03 +0800 Subject: [PATCH 21/93] =?UTF-8?q?=E5=AE=8C=E6=95=B4mail.text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/mailer/applied_project.text.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/mailer/applied_project.text.erb b/app/views/mailer/applied_project.text.erb index 7af8c2018..0dd3f308d 100644 --- a/app/views/mailer/applied_project.text.erb +++ b/app/views/mailer/applied_project.text.erb @@ -1,4 +1,7 @@ -<%= l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name) %> +<%= l(:mail_issue_content)%> +<%=link_to @user.show_name, user_url(@user) %> +<%=link_to @project.name, @applied_url %> + + -

    <%= link_to(h(@project.name), @applied_url) %>

    From 6e9db8b9226c7d48ff3829a0fd29ca5ce76126cb Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Sep 2015 15:08:40 +0800 Subject: [PATCH 22/93] =?UTF-8?q?=E5=B0=81=E8=A3=85=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 40 +++++++++++++++++------------ 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0783d1805..c00f7ec17 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -101,22 +101,10 @@ class UsersController < ApplicationController elsif @user != User.current && !User.current.admin? return render_403 end - # 记录当前点击按钮的时间 - # 考虑到用户未退出刷新消息页面 - message_time = OnclickTime.where("user_id =?", User.current).first - if message_time.nil? - message_new_time = OnclickTime.new - message_new_time.user_id = User.current.id - message_new_time.onclick_time = Time.now - message_new_time.save - else - # 24小时内显示 - contrast_time = Time.now - 86400 - message_time.update_attributes(:onclick_time => Time.now) - end - @user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc") - # 当前用户查看消息,则设置消息为已读 - # DO 待优化,只需查出符合条件的再更新 + # 初始化/更新 点击按钮时间 + # 24小时内显示系统消息 + update_onclick_time + # 全部设为已读 if params[:viewed] == "all" course_querys = @user.course_messages forge_querys = @user.forge_messages @@ -197,6 +185,26 @@ class UsersController < ApplicationController end end + # 初始化/更新 点击按钮时间 + def update_onclick_time + # 记录当前点击按钮的时间 + # 考虑到用户未退出刷新消息页面 + + message_time = OnclickTime.where("user_id =?", User.current).first + if message_time.nil? + message_new_time = OnclickTime.new + message_new_time.user_id = User.current.id + message_new_time.onclick_time = Time.now + message_new_time.save + else + # 24小时内显示 + contrast_time = Time.now - 86400 + message_time.update_attributes(:onclick_time => Time.now) + end + # 24小时内显示系统消息 + @user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc") + end + # 系统消息 def user_system_messages @sytem_messages = SystemMessage.order("created_at desc").all From d9620e416edf0f7fb12920d2db8a31f5d7b0bb44 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Sep 2015 15:17:10 +0800 Subject: [PATCH 23/93] =?UTF-8?q?=E4=BC=98=E5=8C=96=E2=80=9C=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E8=AE=BE=E4=B8=BA=E5=B7=B2=E8=AF=BB=E2=80=9D=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c00f7ec17..874f9c607 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -106,16 +106,7 @@ class UsersController < ApplicationController update_onclick_time # 全部设为已读 if params[:viewed] == "all" - course_querys = @user.course_messages - forge_querys = @user.forge_messages - user_querys = @user.user_feedback_messages - forum_querys = @user.memo_messages - if User.current.id == @user.id - course_querys.update_all(:viewed => true) - forge_querys.update_all(:viewed => true) - user_querys.update_all(:viewed => true) - forum_querys.update_all(:viewed => true) - end + update_message_viewed(@user) end # @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count case params[:type] @@ -189,7 +180,6 @@ class UsersController < ApplicationController def update_onclick_time # 记录当前点击按钮的时间 # 考虑到用户未退出刷新消息页面 - message_time = OnclickTime.where("user_id =?", User.current).first if message_time.nil? message_new_time = OnclickTime.new @@ -205,6 +195,20 @@ class UsersController < ApplicationController @user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc") end + # 消息设置为已读 + def update_message_viewed(user) + course_querys = CourseMessage.where("user_id =? and viewed =?", user, 0) + forge_querys = ForgeMessage.where("user_id =? and viewed =?", user, 0) + user_querys = UserFeedbackMessage.where("user_id =? and viewed =?", user, 0) + forum_querys = MemoMessage.where("user_id =? and viewed =?", user, 0) + if User.current.id == @user.id + course_querys.update_all(:viewed => true) + forge_querys.update_all(:viewed => true) + user_querys.update_all(:viewed => true) + forum_querys.update_all(:viewed => true) + end + end + # 系统消息 def user_system_messages @sytem_messages = SystemMessage.order("created_at desc").all From 553c1396dd2ee5822ff968283bd2edf8b5c9d0ce Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Sep 2015 15:31:00 +0800 Subject: [PATCH 24/93] =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E5=8A=9F=20=E7=BB=99=E5=87=BA=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=20=E5=B8=96=E5=AD=90=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forums_controller.rb | 11 ++------- app/controllers/memos_controller.rb | 37 ++++------------------------ app/views/forums/show.html.erb | 31 ++++++++++++++++++++--- 3 files changed, 35 insertions(+), 44 deletions(-) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 415321655..be6543be2 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -7,7 +7,7 @@ class ForumsController < ApplicationController before_filter :find_forum_if_available before_filter :authenticate_user_edit, :only => [:edit, :update] before_filter :authenticate_user_destroy, :only => [:destroy] - before_filter :require_login, :only => [:new, :create,:show,:destroy,:update,:edit] + before_filter :require_login, :only => [:new, :create,:destroy,:update,:edit] helper :sort include SortHelper @@ -164,14 +164,7 @@ class ForumsController < ApplicationController @memos @my_topic_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is null").count @my_replies_count = Memo.where("forum_id = #{@forum.id} and author_id = #{User.current.id} and parent_id is not null").count - # @offset, @limit = api_offset_and_limit({:limit => 10}) - # @forum = Forum.find(params[:id]) - # @memos_all = @forum.topics - # @topic_count = @memos_all.count - # @topic_pages = Paginator.new @topic_count, @limit, params['page'] - - # @offset ||= @topic_pages.offset - # @memos = @memos_all.offset(@offset).limit(@limit).all + @errors = params[:errors] respond_to do |format| format.js format.html { diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 9922aabbe..f7de712ca 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -73,41 +73,14 @@ class MemosController < ApplicationController end end #end - format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" } - format.json { render json: @memo, status: :created, location: @memo } + format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" } + format.json { render json: @memo, status: :created, location: @memo } else flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" - # back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id) - pre_count = REPLIES_PER_PAGE - - @memo_new = @memo.dup - @memo = @memo.root # 取出楼主,防止输入帖子id让回复作为主贴显示 - unless @memo.new_record? - @memo.update_column(:viewed_count, (@memo.viewed_count.to_i + 1)) - end - - - page = params[:page] - if params[:r] && page.nil? - offset = @memo.children.where("#{Memo.table_name}.id < ?", params[:r].to_i).count - page = 1 + offset / pre_count - else - - end - @reply_count = @memo.children.count - @reply_pages = Paginator.new @reply_count, pre_count, page - @replies = @memo.children. - includes(:author, :attachments). - reorder("#{Memo.table_name}.created_at DESC"). - limit(@reply_pages.per_page). - offset(@reply_pages.offset). - all - if @memo.new_record? - format.html { render :new,:layout=>'base_forums'} - else - format.html { render action: :show } + format.js + format.html { redirect_to( forum_path(Forum.find(params[:forum_id]),:errors=>@memo.errors.full_messages[0])) } format.json { render json: @memo.errors, status: :unprocessable_entity } - end + #end end end diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index ee3679241..ad54f6bc0 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,3 +1,4 @@ +<%= javascript_include_tag 'new_user' %>
    + onclick="$('#error').hide();clear_form();$('#new_forum_div').slideToggle();$(this).parent().slideToggle();">新建贴吧
    \ No newline at end of file diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index f7c74e9a7..aeb0e1654 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -49,7 +49,21 @@ $("#reorder_popu").removeClass("sortArrowActiveD"); add_class("reorder_time"); }); - + document.getElementById('forum_name').onkeydown = function() + { + var n = 0; + var str = this.value; + for (i = 0; i < str.length; i++) { + var leg = str.charCodeAt(i);//ASCII码 + if (leg > 255) {//大于255的都是中文 + n += 2;//如果是中文就是2个字节 + } else { + n += 1;//英文,不多说了 + } + } + if(n >= 160) + event.returnValue = false; + } }); function check_and_submit(doc){ $("#error").html('').hide(); @@ -88,6 +102,9 @@ $('#error').hide(); $('#new_forum_div').slideToggle(); $('#create_btn').parent().slideToggle(); + clear_form(); + } + function clear_form(){ $("#forum_name").val(''); $("#forum_desc").val(''); } @@ -100,7 +117,7 @@ <%= form_tag({:controller => 'forums',:action=>'create',:format=>'js'},:method => 'post',:remote=>'true') do |f| %>
    - + \ 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 af5a8bf50..000000000 --- a/app/views/homework_common/_new_homework_detail_manual_form.html.erb +++ /dev/null @@ -1,74 +0,0 @@ -
    -
    -
    -
    发布作业
    -
    -
    -
    - -
    -
    - 导入作业 - -
    - -
    -
    -
    -
    - <% 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 %> -
    -
    - -
    - - -
    - 高级功能 -
    -
    -
    - -
    - 发布 - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%> -
    -
    -
    -
    - -
    - - - 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/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index b19125ec6..6e07e7122 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -21,14 +21,6 @@ <%= calendar_for('homework_end_time')%>
    -
    - - <%= calendar_for('evaluation_start_time')%> -
    -
    - - <%= calendar_for('evaluation_end_time')%> -

    From b5af66ffc283c223f156c3c182c706db16109d94 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 23 Sep 2015 09:58:31 +0800 Subject: [PATCH 46/93] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=9A=84js=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/new_user.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 95d85e48c..fb71d75db 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -63,12 +63,12 @@ function submit_homework(id){ else if(!regex_homework_end_time()){ $("#homework_end_time").focus(); } - else if(!regex_evaluation_start()){ - $("#evaluation_start_time").focus() - } - else if(!regex_evaluation_end()){ - $("#evaluation_end_time").focus() - } + //else if(!regex_evaluation_start()){ + // $("#evaluation_start_time").focus() + //} + //else if(!regex_evaluation_end()){ + // $("#evaluation_end_time").focus() + //} else if(!regex_course_id()){ $("#course_id").focus(); } From afb1a8f53f7e83680086718c27cf20bbdcb631a5 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 23 Sep 2015 09:59:23 +0800 Subject: [PATCH 47/93] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=A1=86=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=8C=89=E9=92=AE=E7=9A=84=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- app/views/users/_course_news.html.erb | 2 +- app/views/users/_project_issue.html.erb | 2 +- app/views/users/_project_message.html.erb | 2 +- public/javascripts/init_activity_KindEditor.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index bed895ee8..fd9ae05e8 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -107,7 +107,7 @@
    - 发送 +

    <% end%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 97f0acb69..99e85fc73 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -77,7 +77,7 @@
    - 发送 +

    <% end%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index e8bac335c..0b86dc3eb 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -121,7 +121,7 @@
    - 发送 +

    <% end%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 32468f9a0..2856d6ed1 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -92,7 +92,7 @@
    - 发送 +

    <% end%> diff --git a/public/javascripts/init_activity_KindEditor.js b/public/javascripts/init_activity_KindEditor.js index c9d8189c2..decbbb341 100644 --- a/public/javascripts/init_activity_KindEditor.js +++ b/public/javascripts/init_activity_KindEditor.js @@ -48,7 +48,7 @@ function init_editor(params){ }, afterCreate:function(){ - params.submit_btn.hide(); + //params.submit_btn.hide(); var toolbar = $("div[class='ke-toolbar']",params.div_form); toolbar.css('width',24); $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); From 272d9fa527eb17b6cc8be910ed48be57a700cd69 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 23 Sep 2015 11:02:22 +0800 Subject: [PATCH 48/93] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/tags_controller.rb | 2 + app/views/files/index.html.erb | 3 +- app/views/forums/_forum_tag_list.html.erb | 5 ++- app/views/layouts/base_forums.html.erb | 50 +++++++++++++++++++++++ app/views/tags/update_tag_name.js.erb | 2 + 5 files changed, 59 insertions(+), 3 deletions(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 7dc647911..0ffa334c2 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -300,6 +300,8 @@ class TagsController < ApplicationController @containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)] show_attachments @containers + elsif @obj && @obj_flag == '5' + @forum = @obj end respond_to do |format| format.js diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 537a7a0dc..489c0357d 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -242,7 +242,8 @@ ele = domEle; tagId = id; taggableType = type; - domEle.html(''); + 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(); } diff --git a/app/views/forums/_forum_tag_list.html.erb b/app/views/forums/_forum_tag_list.html.erb index c0efbe4b9..2a0257d63 100644 --- a/app/views/forums/_forum_tag_list.html.erb +++ b/app/views/forums/_forum_tag_list.html.erb @@ -1,7 +1,8 @@ <% forum.tag_list.each do |tag|%> + × <% end %> + <% end %> \ No newline at end of file diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 8d2fcd7d9..79341d458 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -66,12 +66,62 @@ '<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(), {} ); + $("input[name='addTag']").val(''); }else{ alert("标签名字长度不能超过14个字符"); } } } } + + var tagNameHtml; //当前双击的链接的父节点的html + var tagName; //标签的值 + var parentCssBorder; //当前双击的链接的父节点 + var ele; //当前双击的链接 + var taggableId; //标签的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; + taggableId = 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).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": taggableId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim()} + ) + }else{ + ele.parent().css("border",""); + ele.parent().html(tagNameHtml); + } + } + } + }); diff --git a/app/views/tags/update_tag_name.js.erb b/app/views/tags/update_tag_name.js.erb index 276c050b8..ec81e7cbc 100644 --- a/app/views/tags/update_tag_name.js.erb +++ b/app/views/tags/update_tag_name.js.erb @@ -40,6 +40,8 @@ $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_nam $('#tags_name').val(""); <% elsif @obj_flag == '10'%> //$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); +<% elsif @obj_flag == '5'%> + $('#forum_tag_list').html('<%= escape_javascript(render :partial=>'forums/forum_tag_list',:locals=>{:forum=>@forum})%>') <% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); From 5ba889ecc1dc804995e31300126f3d3ec7bb8468 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 23 Sep 2015 11:14:44 +0800 Subject: [PATCH 49/93] =?UTF-8?q?=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 6a061d2b3..58beadb29 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -94,7 +94,7 @@
    - +
    diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 5e049e029..006947928 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -58,6 +58,12 @@ h4{ font-size:14px; color:#3b3b3b;} .clearfix{clear:both;zoom:1} .break_word{ word-break:break-all; word-wrap: break-word;} .white_space{white-space:nowrap;} +.fontGrey3 {color:#484848;} +a.linkGrey6 {color:#484848 !important;} +a.linkGrey6:hover {color:#ffffff !important;} +.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} +.markInput {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;} +.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} /* Spacing */ .ml2{ margin-left:2px;} @@ -527,7 +533,7 @@ a.homepageWhite:hover {color:#a1ebff} a.newsGrey {color:#4b4b4b;} a.newsGrey:hover {color:#000000;} a.newsRed {color:red;} -a.newsRed:hovor {color:#888888;} +a.newsRed:hover {color:#888888;} a.replyGrey {color:#888888; display:inline-block;} a.replyGrey:hover {color:#4b4b4b;} a.replyGrey1 {color:#888888;} @@ -768,9 +774,6 @@ div.modal { .ui-widget { font-family: Verdana, sans-serif; font-size: 1.1em; - width: 200px; - height: 14px; - background: #e2e2e2; } .ui-dialog .ui-dialog-content { position: relative; From 5b671c5109ef0b5dd26f17a6f2b3295084e57695 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 23 Sep 2015 14:27:47 +0800 Subject: [PATCH 54/93] =?UTF-8?q?issue=20=E5=BC=95=E7=94=A8=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9=20issue=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_attributes.html.erb | 48 ++++----- app/views/issues/_attributes_show.html.erb | 52 +++++++++ app/views/issues/_edit.html.erb | 4 +- app/views/issues/_form.html.erb | 22 ++-- app/views/issues/_form_custom_fields.html.erb | 22 ++-- app/views/issues/show.html.erb | 101 +++++------------- app/views/journals/new.js.erb | 3 +- public/javascripts/project.js | 3 + 8 files changed, 123 insertions(+), 132 deletions(-) create mode 100644 app/views/issues/_attributes_show.html.erb 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 @@
  • <% 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 @@
  • <% 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 @@ <% 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? %> <%= 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 @@
  • <% 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 @@
  • <% 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 @@
  • <% 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.status.name %>

      +
    • +
      + <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> +
    •  指派给  : 

      <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> +
    • + <% end %> +
      +
    +
      +
    •  优先级  : 

      <%= @issue.priority.name %> +
    • +
      + <% unless @issue.disabled_core_fields.include?('done_ratio') %> +
    •  % 完成  : 

      <%= @issue.done_ratio %>% +
    • + <% end %> +
      +
    +
      + <% unless @issue.disabled_core_fields.include?('start_date') %> +
    •  开始  : 

      <%= format_date(@issue.start_date) %>

      +
    • + <% end %> +
      + <% unless @issue.disabled_core_fields.include?('estimated_hours') %> +
    •  周期  : 

      <%= l_hours(@issue.estimated_hours) %> +
    • + <% 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 3a3782e47..c6b805d0a 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -14,7 +14,9 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
    <% end %> -
    +
    + +
    回复 <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %> 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? %>

    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/show.html.erb b/app/views/issues/show.html.erb index d57be8a91..67867e2c6 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,100 +21,53 @@


    - 由<%= @issue.author %> - 添加于 <%= format_time(@issue.created_on).html_safe %> + 由<%= @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 %> -
    -
    - - - <%= link_to_attachment_project @issue, :thumbnails => true %>
    - <% end -%> - <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> -
    -
    - -
    - <%= issue_fields_rows do |rows| %> -
      -
    •  状态  : 

      <%= @issue.status.name %>

      -
    • -
      - <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
    •  指派给  : 

      <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> -
    • - <% end %> -
      -
    -
      -
    •  优先级  : 

      <%= @issue.priority.name %> -
    • -
      - <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
    •  % 完成  : 

      <%= @issue.done_ratio %>% -
    • - <% end %> -
      -
    +
    + <% end -%> + +
    + + + <%= link_to_attachment_project @issue, :thumbnails => true %>
    + <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> +
    +
    + + + <%= render :partial => 'attributes_show' %> + + + <%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %> + + +
    +
    -
      - <% unless @issue.disabled_core_fields.include?('start_date') %> -
    •  开始  : 

      <%= format_date(@issue.start_date) %>

      -
    • - <% end %> -
      - <% unless @issue.disabled_core_fields.include?('estimated_hours') %> -
    •  周期  : 

      <%= l_hours(@issue.estimated_hours) %> -
    • - <% 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) %> -
  • - -
    - <%= 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"}%> @@ -124,6 +78,7 @@ <%= render :partial => 'changesets', :locals => {:changesets => @changesets} %> <% end %> +
    <% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index ae2574595..b24b5ffb6 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,10 +1,11 @@ $('#issue_notes').val("<%= raw escape_javascript(@content) %>"); <% # when quoting a private journal, check the private checkbox - if @journal && @journal.private_notes? + if @journal && @journal.private_notes? %> $('#issue_private_notes').attr('checked', true); <% end %> +//quote_issue_journal() showAndScrollTo("update", "notes"); $('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight; diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 7e9643bc7..d3c3377f5 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -369,6 +369,9 @@ $(document).ready(function () { $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400); } + function quote_issue_journal(){ + document.getElementById("#issue_notes").focus(); + } /*缺陷完成度决定缺陷状态*/ function PrecentChange(obj) { From 841c680bb14c04d3d7b826b6793540dc80469bb4 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 23 Sep 2015 14:53:50 +0800 Subject: [PATCH 55/93] =?UTF-8?q?1.=E4=BD=9C=E4=B8=9A=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA=E8=80=81=E5=B8=88=E3=80=81?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E8=AF=BE=E7=A8=8B=E5=AD=A3=E5=BA=A6?= =?UTF-8?q?=E7=AD=89=E4=BF=A1=E6=81=AF=202.=E4=BD=9C=E4=B8=9A=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8Ctips=E4=B8=AD?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 9 ++++++--- public/stylesheets/new_user.css | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index ac4572b5b..97a67a717 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -118,15 +118,18 @@ <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
    • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
    • -
    • <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布了作业:
    • -
    • +
    • <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + ">发布了作业于课程:<%= ma.course_message.course.name %> +
    • +
    • <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
    • + <%if @forum.creator.id == User.current.id%>
      + + + 编辑贴吧 + 删除贴吧 + + <% end %>
      <%= link_to image_tag(url_to_avatar(User.current),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path( User.current) %>
      diff --git a/public/stylesheets/images/post_image_list.png b/public/stylesheets/images/post_image_list.png index 86aab4c79da00af1cc7655a2d53013c233b13ae4..07636288d621c75c88dc27fa7291b30675c3f012 100644 GIT binary patch literal 4952 zcmZ`*cQD+668>q?qD1e#Bua=D5#*F`MDK)XaoQciDW@JHh-lHGccPaFfavP1_J<)XgVq>>F7AP!d*QaT-`X-l$1E!++87#P&)wdnakAoHc7zJ z$uDE=D2x`H#VEvww3e+7IL1IKh`yc~s*cCEG0?v$B%X!#n zukbO#EXvSa`Y-!J@%I4VgZ=%>-Nz%nW<1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;LHN&Hsl^Mb>eb8io0tmhq(Q27GL zF|wE#x`bDEyXj>i!I#w`Qc0b!><~T|7f2Zy5GL*x8?yG9m+=-fyMSGqY0BH0!B;VY%aP^vwv$n?; IS$aqQ2l)VA5&!@I diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 1b0dd5533..4e1aad655 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -759,7 +759,8 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no .postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;} a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;} - +.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;} +.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} @@ -943,8 +944,8 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;} .w720{width:721px;} .w709{width: 709px;} .w701{width: 701px;} -a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} -a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#269ac9;} +/*a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}*/ +/*a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#269ac9;}*/ a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} @@ -961,8 +962,8 @@ a:hover.BlueCirBtn{ background:#3598db; color:#fff;} .W440{ width:440px;} .W120{ width:110px;} .W700{ width:700px;} -a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} -a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;} +/*a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}*/ +/*a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;}*/ a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} From fa13ccfaa8c509b45708caf23357460ca91ed674 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 23 Sep 2015 15:44:48 +0800 Subject: [PATCH 57/93] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 132 ++++-------------- .../_set_evalutation_att.html.erb | 83 ++++++----- .../set_evaluation_attr.js.erb | 1 + .../start_evaluation_set.js.erb | 6 + app/views/users/_user_homework_list.html.erb | 2 +- app/views/users/user_homeworks.html.erb | 9 -- config/routes.rb | 2 + public/javascripts/new_user.js | 57 ++++++-- public/stylesheets/new_user.css | 3 +- 9 files changed, 131 insertions(+), 164 deletions(-) create mode 100644 app/views/homework_common/set_evaluation_attr.js.erb create mode 100644 app/views/homework_common/start_evaluation_set.js.erb diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 41d302829..00d814bd3 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -5,9 +5,9 @@ class HomeworkCommonController < ApplicationController layout "base_courses" include StudentWorkHelper - before_filter :find_course, :only => [:index,:new,:create,:next_step] - before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy] - before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment] + before_filter :find_course, :only => [:index,:new,:create] + before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr] + before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr] before_filter :member_of_course, :only => [:index] def index @@ -23,116 +23,11 @@ class HomeworkCommonController < ApplicationController #新建作业,在个人作业列表创建作业 def new render_404 - # @homework_type = "1" - # - # @homework = HomeworkCommon.new - # @homework.safe_attributes = params[:homework_common] - # @homework.late_penalty = 2 - # @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') - # @homework.publish_time = Time.now.strftime('%Y-%m-%d') - # - # if @homework_type == "1" - # #匿评作业相关属性 - # @homework_detail_manual = HomeworkDetailManual.new - # @homework_detail_manual.ta_proportion = 0.6 - # @homework_detail_manual.absence_penalty = 2 - # @homework_detail_manual.evaluation_num = 3 - # @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d') - # @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d') - # @homework.homework_detail_manual = @homework_detail_manual - # elsif @homework_type == "2" - # #编程作业相关属性 - # @homework_detail_programing = HomeworkDetailPrograming.new - # @homework.homework_detail_programing = @homework_detail_programing - # end - # respond_to do |format| - # format.html - # end end #新建作业,在个人作业列表创建作业 def create redirect_to user_homeworks_user_path(User.current.id) - # if params[:homework_common] - # homework = HomeworkCommon.new - # homework.name = params[:homework_common][:name] - # homework.description = params[:homework_common][:description] - # homework.end_time = params[:homework_common][:end_time] - # homework.publish_time = params[:homework_common][:publish_time] - # homework.homework_type = params[:homework_common][:homework_type] - # homework.late_penalty = params[:late_penalty] - # homework.user_id = User.current.id - # homework.course_id = @course.id - # - # homework.save_attachments(params[:attachments]) - # render_attachment_warning_if_needed(homework) - # - # if homework.homework_type == 2 - # homework_detail_programing = HomeworkDetailPrograming.new - # homework_detail_programing.language = params[:language] - # homework_detail_programing.standard_code = params[:standard_code] - # homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 - # question = {title:homework.name,content:homework.description} - # question[:input] = [] - # question[:output] = [] - # if params[:input] && params[:output] && params[:result] - # params[:input].each do |k,v| - # if params[:output].include? k - # homework_test = HomeworkTest.new - # homework_test.input = v - # homework_test.output = params[:output][k] - # homework_test.result = params[:result][k] - # homework_test.error_msg = params[:error_msg] - # homework.homework_tests << homework_test - # question[:input] << homework_test.input - # question[:output] << homework_test.output - # end - # end - # end - # - # # uri = URI('http://192.168.80.21:8080/api/questions.json') - # # body = question.to_json - # # res = Net::HTTP.new(uri.host, uri.port).start do |client| - # # request = Net::HTTP::Post.new(uri.path) - # # request.body = body - # # request["Content-Type"] = "application/json" - # # client.request(request) - # # end - # # result = JSON.parse(res.body) - # # homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0 - # - # homework.homework_detail_programing = homework_detail_programing - # else - # #匿评作业相关属性 - # homework_detail_manual = HomeworkDetailManual.new - # homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6 - # homework_detail_manual.comment_status = 1 - # homework_detail_manual.evaluation_start = params[:evaluation_start] - # homework_detail_manual.evaluation_end = params[:evaluation_end] - # homework_detail_manual.evaluation_num = params[:evaluation_num] - # homework_detail_manual.absence_penalty = params[:absence_penalty] - # homework.homework_detail_manual = homework_detail_manual - # end - # - # if homework.save - # homework_detail_programing.save if homework_detail_programing - # homework_detail_manual.save if homework_detail_manual - # respond_to do |format| - # format.html { - # flash[:notice] = l(:notice_successful_create) - # redirect_to homework_common_index_path(:course => @course.id) - # } - # end - # return - # end - # end - # - # respond_to do |format| - # format.html { - # flash[:notice] = l(:notice_failed_create) - # redirect_to new_homework_common_path(:course => @course.id) - # } - # end end def edit @@ -294,6 +189,27 @@ class HomeworkCommonController < ApplicationController end end + #启动匿评参数设置 + def start_evaluation_set + + end + + #设置匿评参数 + def set_evaluation_attr + if @homework_detail_manual + unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s + @homework_detail_manual.evaluation_start = params[:evaluation_start] + end + + unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s + @homework_detail_manual.evaluation_end = params[:evaluation_end] + end + + @homework_detail_manual.evaluation_num = params[:evaluation_num] + @homework_detail_manual.save + end + end + private #获取课程 def find_course diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb index 1ad8188ef..01d9351ee 100644 --- a/app/views/homework_common/_set_evalutation_att.html.erb +++ b/app/views/homework_common/_set_evalutation_att.html.erb @@ -1,44 +1,53 @@
      - 匿评设置 -
      + <%= form_for('new_form',:url => {:controller => 'homework_common',:action => 'set_evaluation_attr',:homework => @homework.id},:method => "post",:remote => true) do |f|%> + 匿评设置 +
      -
      - 开启匿评 -
      - - <%= calendar_for('evaluation_start_time')%> -
      -
      +
      + 开启匿评 +
      + + <%= calendar_for('evaluation_start_time')%> +
      +
      +

      +
      +
      -
      +
      + 关闭匿评 +
      + + <%= calendar_for('evaluation_end_time')%> +
      +
      +

      +
      +
      -
      - 关闭匿评 -
      - - <%= calendar_for('evaluation_end_time')%> -
      -
      -
      +
      + 匿评人数 + +
      +

      +
      +
      -
      - 匿评人数 - -
      -
      +
      + 禁用匿评 + + 禁用后将无法进行学生互评 +
      +
      -
      - 禁用匿评 - - 禁用后将无法进行学生互评 -
      -
      - -
      - -
      - 取消 -
      -
      -
      +
      +
      + 确定 +
      +
      + 取消 +
      +
      +
      + <% 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_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/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 61c9ff8a0..2fc2304d1 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -61,7 +61,7 @@ <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
    • - 匿评设置 + <%= link_to "匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true%>
    • <%= homework_anonymous_comment homework_common %> diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index b6f4dd7e0..a37709b69 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -7,15 +7,6 @@ homework_description_editor.html(""); $("#homework_editor").toggle(); } - - function set_evaluation_att(){ - $('#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"); - }
      作业
      diff --git a/config/routes.rb b/config/routes.rb index 409a04b20..ba6d161c2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -101,6 +101,8 @@ RedmineApp::Application.routes.draw do get 'start_anonymous_comment' get 'stop_anonymous_comment' get 'alert_anonymous_comment' + get 'start_evaluation_set' + post 'set_evaluation_attr' end collection do post 'next_step' diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index fb71d75db..86456bd8a 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -136,18 +136,36 @@ function search_homework_by_name(url){ ); } +//提交匿评参数设置 +function submit_set_evaluation_attr(end_time){ + if(!regex_evaluation_start(end_time)){ + $("#evaluation_start_time").focus(); + } + else if(!regex_evaluation_end()){ + $("#evaluation_end_time").focus(); + } + else if(!regex_evaluation_num()){ + $("#evaluation_num").focus(); + } + else{ + $('#popbox02 form').submit(); + } +} + //验证匿评开启时间:大于截止时间,或者为空 -function regex_evaluation_start(){ +function regex_evaluation_start(end_time){ var evaluation_start = $.trim($("#evaluation_start_time").val()); if(evaluation_start == ""){ - return true; + $("#homework_evaluation_start_time").text("开启匿评日期不能为空"); + return false; } - var end_time = new Date($.trim($("#homework_end_time").val())); + var end_time = new Date(end_time); var evaluation_start_time = new Date(evaluation_start); if(evaluation_start_time > end_time){ + $("#homework_evaluation_start_time").text(""); return true; }else{ - $("#homework_end_time_span").text("开启匿评日期必须大于截止日期"); + $("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期"); return false; } } @@ -157,17 +175,40 @@ function regex_evaluation_end(){ var evaluation_start = $.trim($("#evaluation_start_time").val()); var evaluation_end = $.trim($("#evaluation_end_time").val()); if(evaluation_end == ""){ + $("#homework_evaluation_end_time").text("关闭匿评日期不能为空"); return true; - }else if(evaluation_start == ""){ - $("#homework_end_time_span").text("开启匿评日期为空时,关闭匿评日期必须为空"); - return false; } var evaluation_start_time = new Date(evaluation_start); var evaluation_end_time = new Date(evaluation_end); if(evaluation_end_time > evaluation_start_time){ + $("#homework_evaluation_end_time").text(""); return true; }else{ - $("#homework_end_time_span").text("关闭匿评日期必须大于开启匿评日期"); + $("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期"); + return false; + } +} + +//验证匿评数量 +function regex_evaluation_num(){ + var evaluation_num = $.trim($("#evaluation_num").val()); + var regex = /^\d+$/; + if(evaluation_num==""){ + $("#evaluation_num_notice").text("匿评人数不能为空"); + return false; + } + else if(regex.test(evaluation_num)){ + if(evaluation_num > 0){ + $("#evaluation_num_notice").html(""); + return true; + } + else{ + $("#evaluation_num_notice").text("匿评人数必须为大于0"); + return false; + } + } + else{ + $("#evaluation_num_notice").text("匿评人数只能为数字"); return false; } } diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 006947928..ed872936e 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -62,7 +62,7 @@ h4{ font-size:14px; color:#3b3b3b;} a.linkGrey6 {color:#484848 !important;} a.linkGrey6:hover {color:#ffffff !important;} .markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} -.markInput {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;} +.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;} .markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} /* Spacing */ @@ -109,6 +109,7 @@ a.linkGrey6:hover {color:#ffffff !important;} .mb8 {margin-bottom:8px !important;} .mb10{ margin-bottom:10px !important;} .mb12 {margin-bottom:12px !important;} +.mb15{margin-bottom: 15px;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} .w20{ width:20px;} From 6ac5b738e38257ab80261ed10fe992cd633921b0 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 23 Sep 2015 16:27:13 +0800 Subject: [PATCH 58/93] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_form_edit_mode.html.erb | 63 ++++++------------- app/views/forums/edit.html.erb | 74 ++++++++++++++++++++++- app/views/layouts/base_forums.html.erb | 4 +- public/stylesheets/new_user.css | 3 +- 4 files changed, 95 insertions(+), 49 deletions(-) diff --git a/app/views/forums/_form_edit_mode.html.erb b/app/views/forums/_form_edit_mode.html.erb index a9bb05f79..9c0ec27bd 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/edit.html.erb b/app/views/forums/edit.html.erb index 0a40120c7..24130e727 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -1,4 +1,72 @@ - -

      编辑讨论区

      -<%= 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/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 962331fad..7808af055 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -143,7 +143,7 @@
      @@ -171,7 +171,7 @@
      - 编辑贴吧 + 编辑贴吧 删除贴吧 <% end %> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 4e1aad655..c97483c9b 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -723,7 +723,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re .postRow {width:970px; border-bottom:1px solid #efefef; padding:15px 0;} .postPortrait {width:75px; height:75px; float:left; margin-right:15px;} .postWrap {width:690px; float:left; margin-right:95px;} -.postTitle {width:690px; max-width:690px; margin-bottom:5px;} +.postTitle {width:690px; max-width:690px; margin-bottom:5px;word-break: break-all; word-wrap:break-word; } .postDes {width:690px; max-width:690px; margin-bottom:6px; color:#484848;} .postCreater {color:#888888; font-size:12px; float:left; margin-right:40px;} .postDate {color:#888888; font-size:12px;} @@ -761,6 +761,7 @@ a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !im a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;} .postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;} .postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;} +.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} From 7383ac7aa934e5f83f61243bc82b8cee5f35f2ef Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 23 Sep 2015 16:36:11 +0800 Subject: [PATCH 59/93] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_forums.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 7808af055..e8fa7a6bf 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -172,7 +172,7 @@ 编辑贴吧 - 删除贴吧 + 删除贴吧 <% end %>
    • From 5ca80d9a4cb44e20a2437fcc405194fe56d7e34e Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 23 Sep 2015 16:46:29 +0800 Subject: [PATCH 60/93] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9A=84=E8=AF=A6=E7=BB=86=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E5=8C=85=E6=8B=AC=E6=89=A3=E5=88=86=E3=80=81=E6=88=AA?= =?UTF-8?q?=E6=AD=A2=E6=97=A5=E6=9C=9F=E7=AD=89=202.=E5=AF=B9=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=92=8C=E5=AD=A6=E7=94=9F=EF=BC=8C=E7=BB=99=E5=87=BA?= =?UTF-8?q?=E7=9A=84tips=E8=A6=81=E6=9C=89=E5=8C=BA=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 37 ++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 97a67a717..ee9c95ccf 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -127,11 +127,38 @@ :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
    • <%= time_tag(ma.created_at).html_safe %>
    • From c8d07dedf6fb1cd5d03cb14f434ac75a239bf017 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 23 Sep 2015 17:09:21 +0800 Subject: [PATCH 61/93] =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=96=E8=BE=91=20=E5=88=A0=E9=99=A4=20=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 12 ++++++++++++ public/stylesheets/new_user.css | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 723bef435..18244d765 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -19,6 +19,18 @@ <%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
      + <% if @memo.author.id == User.current.id%> +
      + +
      + <%end%>
      <%= format_date( @memo.created_at)%>
      diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index c97483c9b..54cdfb842 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -612,7 +612,7 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} -a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} +a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;} .homepagePostReplyPortrait {float:left; width:33px;} .homepagePostReplyDes {float:left; width:632px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} @@ -754,7 +754,7 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no .postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;} .postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;} .postThemeContainer {width:720px;} -.postThemeWrap {width:655px; float:left;} +.postThemeWrap {width:655px; float:left;position: relative} .postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px;} .postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;} a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} From 7b37f3a9f40782308579b117067394fefec3d61b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 23 Sep 2015 17:25:38 +0800 Subject: [PATCH 62/93] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E3=80=81=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=BC=96=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/homework_evaluation.rake | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lib/tasks/homework_evaluation.rake diff --git a/lib/tasks/homework_evaluation.rake b/lib/tasks/homework_evaluation.rake new file mode 100644 index 000000000..691493dc8 --- /dev/null +++ b/lib/tasks/homework_evaluation.rake @@ -0,0 +1,54 @@ +#coding=utf-8 + +namespace :homework_evaluation do + desc "start evaluation" + def get_assigned_homeworks(student_works, n, index) + student_works += student_works + student_works[index + 1 .. index + n] + end + #自动开启匿评的任务 + task :start_evaluation => :environment do + homework_detail_manuals = HomeworkDetailManual.where("evaluation_start = '#{Date.today}'") + homework_detail_manuals.each do |homework_detail_manual| + homework_common = homework_detail_manual.homework_common + if homework_detail_manual.comment_status == 1 #新建状态才可开启匿评 + student_works = homework_common.student_works + if student_works && student_works.size >= 2 + student_works.each_with_index do |work, index| + user = work.user + n = homework_detail_manual.evaluation_num + n = n < student_works.size ? n : student_works.size - 1 + assigned_homeworks = get_assigned_homeworks(student_works, n, index) + assigned_homeworks.each do |h| + student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id) + student_works_evaluation_distributions.save + end + end + homework_detail_manual.update_column('comment_status', 2) + # 匿评开启消息邮件通知 + else + #作业数小于2,启动失败 + end + end + end + end + + #自动关闭匿评的任务 + task :end_evaluation => :environment do + homework_detail_manuals = HomeworkDetailManual.where("evaluation_end = '#{Date.today}'") + homework_detail_manuals.each do |homework_detail_manual| + homework_common = homework_detail_manual.homework_common + if homework_detail_manual.comment_status == 2 #开启匿评状态才可关闭匿评 + #计算缺评扣分 + work_ids = "(" + homework_common.student_works.map(&:id).join(",") + ")" + homework_common.student_works.each do |student_work| + absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count + student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manuals.absence_penalty : 0 + student_work.save + end + homework_detail_manual.update_column('comment_status', 3) + # 匿评关闭消息邮件通知 + end + end + end +end From d727097ed2b69eb8dda9e78dbcc40012481beb0a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 23 Sep 2015 17:33:06 +0800 Subject: [PATCH 63/93] =?UTF-8?q?1=E3=80=81=E5=B7=B2=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BB=A3=E7=A0=81=E6=B2=A1=E6=9C=89=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=202=E3=80=81?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E7=BB=93=E6=9D=9F=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/homework_common/index.html.erb | 4 ++-- app/views/homework_common/stop_anonymous_comment.js.erb | 2 +- app/views/users/_user_homework_list.html.erb | 2 +- lib/tasks/homework_evaluation.rake | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d7fac9a7d..e100a8fc9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2306,7 +2306,7 @@ module ApplicationHelper when 2 link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink' when 3 - link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" + # link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" end else link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 4bf3d1781..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%> - <%= homework_anonymous_comment(homework)%> <%= 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") %> + <%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %> + <%= homework_anonymous_comment(homework)%> <% elsif @is_student%> <%= student_anonymous_comment homework %> <%= student_new_homework homework %> diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb index 3cbac1bf6..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/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 2fc2304d1..89800b768 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -61,7 +61,7 @@ <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
    • - <%= link_to "匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true%> + <%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%>
    • <%= homework_anonymous_comment homework_common %> diff --git a/lib/tasks/homework_evaluation.rake b/lib/tasks/homework_evaluation.rake index 691493dc8..af833448d 100644 --- a/lib/tasks/homework_evaluation.rake +++ b/lib/tasks/homework_evaluation.rake @@ -1,7 +1,7 @@ #coding=utf-8 namespace :homework_evaluation do - desc "start evaluation" + desc "start and end evaluation" def get_assigned_homeworks(student_works, n, index) student_works += student_works student_works[index + 1 .. index + n] From b94c57691a10d0c1d9d63646ae6d8f38fea56b31 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 23 Sep 2015 17:36:36 +0800 Subject: [PATCH 64/93] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E9=87=8D=E6=9E=84=20=E9=A1=B9=E7=9B=AE=E5=85=88=E5=BB=BA?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 4 +- app/helpers/projects_helper.rb | 18 ++++++ app/views/projects/new.html.erb | 88 ++++++++++++++++++++------ config/locales/commons/zh.yml | 3 +- config/locales/projects/zh.yml | 1 + public/javascripts/project.js | 3 +- public/stylesheets/project.css | 1 + 7 files changed, 95 insertions(+), 23 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 4d80efdf3..ee958f20e 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -162,7 +162,7 @@ class ProjectsController < ApplicationController @trackers = Tracker.sorted.all @project = Project.new @project.safe_attributes = params[:project] - render :layout => 'base' + render :layout => 'new_base' else redirect_to signin_url end @@ -220,7 +220,7 @@ class ProjectsController < ApplicationController end else respond_to do |format| - format.html { render :action => 'new', :layout => 'base'}#Added by young + format.html { render :action => 'new', :layout => 'new_base'}#Added by young format.api { render_validation_errors(@project) } end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 6a865b203..2db03dce1 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -76,6 +76,24 @@ module ProjectsHelper return result end + # 项目类型 + def project_type_select + type = [] + option1 = [] + option1 << l(:label_development_team) + option1 << l(:label_development_team) + option2 = [] + option2 << l(:label_research_group) + option2 << l(:label_research_group) + option3 = [] + option3 << l(:label_friend_organization) + option3 << l(:label_friend_organization) + type << option1 + type << option2 + type << option3 + type + end + # 被邀请成员的状态 def status_for_ivitied(ivite_list, project) if ivite_list.user.member_of?(project) diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 98612b733..039a9e69c 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -1,23 +1,73 @@ <% @nav_dispaly_project_label = 1 @nav_dispaly_forum_label = 1 %> -<%= labelled_form_for @project do |f| %> -
      - <%=l(:label_project_new)%> - - -
      -

      - <%=raw l(:label_project_new_description)%> -

      - <%= render :partial => 'form', :locals => { :f => f } %> - - <%= submit_tag l(:button_create), :class => "enterprise"%> - -
      - <%#= submit_tag l(:button_create_and_continue), :name => 'continue' %> - <%= javascript_tag "$('#project_name').focus();" %> -
      -<% end %> +
      +

      <%= l(:label_project_new)%>

      +
      +
      +
        + <%= labelled_form_for @project do |f| %> +
      • + + + + + +
      • +
        +
      • + + <%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %> +
      • +
        +
      • + + +
        +
      • +
      • + + + (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。) +
        +
      • +
      • + 提交 + <%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%> +
        +
      • + <% end%> +
      +
      +
      -<% html_title(l(:label_project_new)) -%> \ No newline at end of file +<% html_title(l(:label_project_new)) -%> + + \ No newline at end of file diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 457d56dad..7cbb223c6 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -284,7 +284,8 @@ zh: label_tags_issue: "问题名称" label_tags_issue_description: 问题描述 - label_tags_project_name: "项目名称:" + label_tags_project_name: "项目名称:" + label_projects_new_name: "项目名称" label_tags_project_description: "项目描述" label_tags_user_mail: "用户邮箱:" diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 599b51c30..b4234f358 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -60,6 +60,7 @@ zh: label_friend_organization: 圈子模式 label_research_group: 研讨模式 label_development_team: 开发模式 + label_type_project: 项目类型 label_member: 成员 project_module_attachments: 资源 diff --git a/public/javascripts/project.js b/public/javascripts/project.js index d3c3377f5..491b5bb92 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -505,4 +505,5 @@ function judgeprojectname(){ //用户反馈 function submitProjectFeedback() { $("#project_feedback_form").submit(); -} \ No newline at end of file +} + diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index bee965a90..f69e828e8 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -3,6 +3,7 @@ .project_content{ width:940px; margin:10px auto;} .project_left{ float:left;} .project_right{ width:670px; float:left;background:#fff; padding:10px;} +.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d;} From 53eaac295e2f38758faf8f724a07b80ba659d38b Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 23 Sep 2015 17:37:40 +0800 Subject: [PATCH 65/93] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=95=99=E8=A8=80?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=AF=B9=E6=96=B9=E5=9B=9E=E5=A4=8D=E7=95=99?= =?UTF-8?q?=E8=A8=80=EF=BC=8Ctips=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=8E=9F?= =?UTF-8?q?=E7=95=99=E8=A8=80=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index ee9c95ccf..8557b7131 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -607,7 +607,14 @@ :onmouseout => "message_titile_hide($(this))" %>
    • <%= time_tag(ma.journals_for_message.created_on).html_safe %>
    • From ad6fbf6c9bf6a752f631d8fae6152ee4f9ed6ad7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 24 Sep 2015 09:25:56 +0800 Subject: [PATCH 66/93] =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E3=80=81=E5=A7=93=E5=90=8D=E3=80=81=E5=AD=A6?= =?UTF-8?q?=E5=8F=B7=E3=80=81=E6=97=B6=E9=97=B4=E5=88=97=E9=83=BD=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=B1=95=E5=BC=80=E4=BD=9C=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_un_work.html.erb | 38 ++++++++++--------- public/javascripts/course.js | 11 ++++++ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index bc9fe2e00..ff2420a1a 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -3,27 +3,29 @@
      • - <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %> -
      • -
      • - <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> -
        - <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> -
        -
      • -
      • -
          -
        • - <%= student_work.user.show_name%> -
        • -
        • - <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> -
        • -
        + <%= link_to(image_tag(url_to_avatar(User.current),:width =>"40",:height => "40"),user_activities_path(User.current.id))%>
      • +
        +
      • + <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> +
        + <%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> +
        +
      • +
      • +
          +
        • + <%= student_work.user.show_name%> +
        • +
        • + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> +
        • +
        +
      • +
    • -
    • +
    • <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>  <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> [迟交] diff --git a/public/javascripts/course.js b/public/javascripts/course.js index b471ea89e..07a149adb 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -975,3 +975,14 @@ $(function(){ function new_homework_alert(){ alert("您好!课程内直接发布作业的功能正在改进中,请直接点击\n顶部导航栏的“作业”向本课程发送作业。谢谢!如有问\n题,可参见帮助中心。"); } + +function show_student_work(url){ + $.get( + url, + { + + }, + function (data) { + } + ); +} From b9ff46f8d01a033adcd39367f78a6a1e7abc6440 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 09:40:53 +0800 Subject: [PATCH 67/93] =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=9A=84=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=B8=8E=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 5 + app/views/forums/index.html.erb | 2 +- app/views/memos/_attachments_links.html.erb | 6 +- app/views/memos/edit.html.erb | 100 +++++++++----------- app/views/memos/show.html.erb | 4 +- public/javascripts/new_user.js | 21 +++- public/stylesheets/header.css | 2 +- public/stylesheets/public_new.css | 2 +- 8 files changed, 79 insertions(+), 63 deletions(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index f7de712ca..f3c383573 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -143,7 +143,12 @@ class MemosController < ApplicationController end def edit + @my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count + @my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count @replying = false + respond_to do |format| + format.html {render :layout=>'base_forums'} + end end def update diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 93dcbc3fa..8f5cb15cc 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -61,7 +61,7 @@ n += 1;//英文,不多说了 } } - if(n >= 160) + if(n >= 160 && event.keyCode != 8) event.returnValue = false; } }); diff --git a/app/views/memos/_attachments_links.html.erb b/app/views/memos/_attachments_links.html.erb index 7da30aad0..15473e6e7 100644 --- a/app/views/memos/_attachments_links.html.erb +++ b/app/views/memos/_attachments_links.html.erb @@ -35,13 +35,13 @@
      <% end %> - <% if attachment.is_text? %> - <%= link_to image_tag('magnifier.png'), + <%# if attachment.is_text? %> + <%#= link_to image_tag('magnifier.png'), :controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename%> - <% end %> + <%# end %> diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 487d923b5..0efa57ccc 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,55 +1,47 @@ - -<% @replying = !@memo.parent.nil? %> -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> -

      <%=l(:label_memo_edit)%>

      -<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> - <% if @memo.errors.any? %> -
      -

      - <%= pluralize(@memo.errors.count, "error") %> - prohibited this memo from being saved: -

      -
        - <% @memo.errors.full_messages.each do |msg| %> -
      • - <%= msg %> -
      • - <% end %> -
      -
      - <% end %> -
      -

      - <% if @memo.parent.nil? && @memo.children.first.nil? %> - <%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%> - <% else %> - <%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%> - <% end %> -

      - <% if User.current.admin?%> -

      - <% unless @replying %> - <% if @memo.safe_attribute? 'sticky' %> - <%= f.check_box :sticky %> - <%= label_tag 'memo_sticky', l(:label_board_sticky) %> - <% end %> - <% if @memo.safe_attribute? 'lock' %> - <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %> - <% end %> - <% end %> -

      - <% end %> -

      - <%= f.kindeditor :content, :required => true, :size => 80,:owner_id => @memo.id,:owner_type => 1 %> -

      - -

      - <%= l(:label_attachment_plural) %> -
      - <%= render :partial => 'attachments/form', :locals => {:container => @memo} %> -

      -
      -
      - <%= f.submit :value => l(:button_change) %>  <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%> +<%= javascript_include_tag 'new_user'%> + +
      +
      编辑帖子
      +
      +
      + <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo),:html=>{:id=>'edit_memo'}) do |f| %> + +
      + +
      -<% end %> +
      + + +
      +
      + + <%= render :partial => 'forums/file_form', :locals => {:container => @memo} %> + + +
      +
      + <% end %> +
      \ No newline at end of file diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 18244d765..57b6875e5 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -24,8 +24,8 @@ diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index eb50c2762..b894edf02 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -249,4 +249,23 @@ var autoTextarea = function (elem, extra, maxHeight) { addEvent('input', change); addEvent('focus', change); change(); -}; \ No newline at end of file +}; + +function limitStrsize(id,length){ + document.getElementById(id).onkeydown = function() + { + var n = 0; + var str = this.value; + for (i = 0; i < str.length; i++) { + var leg = str.charCodeAt(i);//ASCII码 + if (leg > 255) {//大于255的都是中文 + n += 2;//如果是中文就是2个字节 + } else { + n += 1;//英文,不多说了 + } + } + + if(n >= length && event.keyCode !== 8) + event.returnValue = false; + } +} \ No newline at end of file diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css index 2d6f5e0b8..ffea2f5b7 100644 --- a/public/stylesheets/header.css +++ b/public/stylesheets/header.css @@ -55,7 +55,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} .homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} .homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} -.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} +.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left; margin-top:4px;} .newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} .newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css index 7cd0a461c..7dc695428 100644 --- a/public/stylesheets/public_new.css +++ b/public/stylesheets/public_new.css @@ -534,7 +534,7 @@ a.sendButtonBlue:hover {color:#ffffff;} outline:none; } .homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} -.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} +.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left; margin-top:4px;} a.resourcesTypeAll {background:url(images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;} a.resourcesTypeAtt {background:url(images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;} .resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;} From bb676b697b78ce8e050179a233f4e196f070dfdd Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 09:47:40 +0800 Subject: [PATCH 68/93] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E2=80=9C=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E2=80=9D=20=E6=96=B0=E5=BB=BA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=96=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_form_new.html.erb | 28 +++++++++++++++++++++++++++ app/views/projects/new.html.erb | 28 +++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 app/views/projects/_form_new.html.erb diff --git a/app/views/projects/_form_new.html.erb b/app/views/projects/_form_new.html.erb new file mode 100644 index 000000000..c53c23d47 --- /dev/null +++ b/app/views/projects/_form_new.html.erb @@ -0,0 +1,28 @@ +<%# 这些代码删除也没什么影响,暂时放着,待优化 %> +<%= wikitoolbar_for 'project_description' %> + +<% @project.custom_field_values.each do |value| %> +

      + <%= custom_field_tag_with_label :project, value %> +

      +<% end %> +<%= call_hook(:view_projects_form, :project => @project, :form => f) %> +<% unless @project.identifier_frozen? %> + <% content_for :header_tags do %> + <%= javascript_include_tag 'project_identifier' %> + <% end %> +<% end %> + +<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> + <%= javascript_tag do %> + $(document).ready(function() { + $("#project_inherit_members").change(function(){ + if (!$(this).is(':checked')) { + if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { + $("#project_inherit_members").attr("checked", true); + } + } + }); + }); + <% end %> +<% end %> diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 039a9e69c..26fb104bd 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -1,6 +1,6 @@ <% @nav_dispaly_project_label = 1 @nav_dispaly_forum_label = 1 %> - +<%= error_messages_for 'project' %>

      <%= l(:label_project_new)%>

      @@ -17,7 +17,7 @@
    • - <%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %> + <%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %>开发模式开发模式开发模式开发模式开发模式开发模式开发模式开发模
    • @@ -25,12 +25,31 @@
    • +
    • +

      + <%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH, + value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %> + <% unless @project.identifier_frozen? %> + + <%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> + <%= l(:text_project_identifier_info).html_safe %> + + <% end %>

      +
    • - + (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)
    • +
    • +

      + <%= f.text_field :project_type, :value => 0 %> +

      +
    • +
    • + <%= render :partial => 'form_new', :locals => { :f => f } %> +
    • 提交 <%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%> @@ -70,4 +89,5 @@ $("#new_project").submit(); } } - \ No newline at end of file + + From 44b93af3074104cc31807b5ab516423ce77b8c3b Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 09:52:57 +0800 Subject: [PATCH 69/93] =?UTF-8?q?tag=E6=B5=AE=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_forums.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index e8fa7a6bf..e6fe778f4 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -167,8 +167,8 @@
    • - <%if @forum.creator.id == User.current.id%>
      + <%if @forum.creator.id == User.current.id%> 编辑贴吧 From 756664a3db76eb82e9813ce766b06d990185d5f8 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Thu, 24 Sep 2015 11:07:09 +0800 Subject: [PATCH 70/93] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=A7=B0=E5=91=BC?= =?UTF-8?q?=E3=80=81tips=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 65 ++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 8557b7131..c7895efb7 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -176,7 +176,39 @@ :onmouseout => "message_titile_hide($(this))" %>
    •    截止时间快到了!
    • <% else %> @@ -304,7 +336,13 @@ <% if ma.course_message_type == "StudentWorksScore" %> From 6449b2563b9f2e0784ebfebabb4c93df56dfafd5 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 11:19:07 +0800 Subject: [PATCH 71/93] =?UTF-8?q?1=E3=80=81=E5=8E=BB=E6=8E=89=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=9A=90=E8=97=8F=E4=BB=A3=E7=A0=81=E5=BA=93=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=202=E3=80=81=E5=90=8C=E6=AD=A5=E5=9C=88?= =?UTF-8?q?=E5=AD=90=E7=9A=84=E6=8F=8F=E8=BF=B0=203=E3=80=81=E5=9C=88?= =?UTF-8?q?=E5=AD=90JS=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/helpers/projects_helper.rb | 3 +++ app/views/layouts/base_projects.html.erb | 6 +++--- app/views/projects/new.html.erb | 10 +++++++++- app/views/projects/settings/_new_edit.html.erb | 10 ++-------- public/stylesheets/public.css | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ee958f20e..414ef6d70 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -188,7 +188,7 @@ class ProjectsController < ApplicationController @project.safe_attributes = params[:project] @project.organization_id = params[:organization_id] @project.user_id = User.current.id - @project.project_new_type = 1 + @project.project_new_type = params[:project_new_type] if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2db03dce1..f0ce70dc2 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -94,6 +94,9 @@ module ProjectsHelper type end + # 项目类型描述 + + # 被邀请成员的状态 def status_for_ivitied(ivite_list, project) if ivite_list.user.member_of?(project) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index b7b88c186..c9bc68c33 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -170,9 +170,9 @@

      请选择项目类型:

        -
      • id="development_group"/>
      • -
      • id="research_group"/>
      • -
      • id="friend_organization"/>
      • +
      • id="development_group"/>
      • +
      • id="research_group"/>
      • +
      • id="friend_organization"/>
      确定
      diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 26fb104bd..f78bbf0c5 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -17,7 +17,7 @@
    • - <%= select_tag :project_new_type, options_for_select(project_type_select, @project.project_new_type) %>开发模式开发模式开发模式开发模式开发模式开发模式开发模式开发模 + <%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>为团队提供系列在线开发工具!
    • @@ -89,5 +89,13 @@ $("#new_project").submit(); } } + + $(document).ready(function(){ + $('#project_new_type').change(function(){ + alert($(this).children('option:selected').val("开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。")); + var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值 +// var p2=$('#param2').val();//获取本页面其他标签的值 + }) + }) diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb index 8de9b8229..b38871a60 100644 --- a/app/views/projects/settings/_new_edit.html.erb +++ b/app/views/projects/settings/_new_edit.html.erb @@ -5,9 +5,8 @@ <%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
    • -
    • - + @@ -15,7 +14,7 @@
    • - +
    • @@ -24,11 +23,6 @@ >
      -
    • - - > -
      -
    保存 <% end %> diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4f44a8b60..d8902876e 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -852,7 +852,7 @@ div.flash.warning, .conflict { /*弹出框*/ .black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} .white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} -.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.white_content02{display:none;position:fixed;top:15%;left:30%;width:450px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} .floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;} a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;} a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} From f9f51557ddd72d232a84a4cdb7d1188616256068 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 24 Sep 2015 11:31:07 +0800 Subject: [PATCH 72/93] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 67 +++++++++++----------- app/views/layouts/_new_feedback.html.erb | 3 +- public/images/sidebar_bg.png | Bin 9114 -> 9913 bytes public/javascripts/feedback.js | 65 +++++++-------------- public/stylesheets/new_user.css | 17 +++--- public/stylesheets/public.css | 18 +++--- 6 files changed, 73 insertions(+), 97 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 07f852914..9fe25ce95 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -1,9 +1,9 @@ @@ -39,7 +39,7 @@ minStatue : true, skin : 'blue', durationTime : 1000 - } + }; var options = $.extend(defaults, options); this.each(function(){ @@ -56,13 +56,13 @@ if(options.minStatue == "true"){ $(".show_btn").css("float", options.float); sideContent.css('width', 0); - show_btn.css('width', 25); + show_btn.css('width', 29); } //close closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); - show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); + show_btn.stop(true, true).delay(300).animate({ width: '29px'},"fast"); cookiesave('minStatue','true','','',''); }); //show @@ -83,14 +83,10 @@ $(function(){ $("#button1").click(function(){ myTips("<%= l(:label_feedback_success) %>","success"); }); - }); function f_submit() { -// var subject = $("#memo_subject").val(); -// var content = $("#memo_content_1").val(); -// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"..."); $("#new_memo").submit(); } @@ -169,15 +165,15 @@ function cookieget(n)
    <% get_memo %> - <% if @public_forum %> - <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> - <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> - <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> - - <%= l(:label_submit)%> - <% end %> - <% end %> + <% if @public_forum %> + <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> + <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> + <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> + + <%= l(:label_submit)%> + <% end %> + <% end %>
    -
    <%= l(:label_submit)%>
    +
    diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index db0a3c3ee..136e49b37 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -30,6 +30,7 @@
    - 在线客服 + <%= l(:label_submit)%> +
    diff --git a/public/images/sidebar_bg.png b/public/images/sidebar_bg.png index 2704727d7d7984e6fb748b28a35ee9e14cf25d84..9ceea0f9176902560fa21d8eddd17a372d761edd 100644 GIT binary patch delta 7003 zcmaJ_Wmr>x*dB~fkdhK9DVq{0Ns$miP?T<~{u1FYl*!U(U7bob#OL_vC%w=^71BE1PKm&IL`?hcA7{*Czb}U+y-aZ5py& zMz~UZuc8!FX4~WUBD3wa$xl&hc1&)Z2>6+>rzdRaQv1Gsq_3KROHE8t*;_cCOVgk7|#E^W-BmulYMWIQd8IAi_Pm5_cvWKtg)P;>sI-rM?Z-4MOAw?<} zk?5@`D*K#IM61J2Ebvlz=2e-;nEKK;jB_t&^mR4fObm!c+ zAtu6e#46g*=Q3JH4I#499lBWNx!q+6BkQthJY4jr@PshV34O{4^+R)_la#%rM__PP zPsaV^-TmG6zMbBk=b#Z_h=Wj1HjQuY4TMyZA*uI!)(=ucETQ$}@WZ0@ipBw+&~aNp72CmfOt&2{J90nycHX~hAy_6hOuw5yytzn*b+w5wc^|NUl; z>$EN+{3$(6@w#h;>s+%3y>}1ccfFcw9z(kqJQS5Utchj=}vh9I0rD?aiQg(@FX;Nq2sb5xT1(jl+Q-dPj^S_Z#744nvSGqN!L zq~3Lt*p{7{{OGj-eMQh@iv*t-<2xaA+{dnW z?5E%w$NJKc3!7DL5XLx?>=GXq;{!Jrn`I!NW9xv{-!Ov@X~C40^hPO}$=mOhrsh6} zKzPzJez4xE;y(R&@k?74wvk^bMbf*QiRE($JJWJmnD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8oU zOg}v0pB2Uiy0zP*4RLX;2*pB%-b4}qdivh7L(kDlwMxol$iGRxf6FguqYnVcNCyMs zJqcL>Is+&{P`Hv3q-lN5|->Wt}y0id_@5Tg#Fz z_iQL@eI#knHChja_{Gpo*a0frdAU#cM;HG`x>>G zgOsQ&Z8ZU52CE|Hyog9O$ps4k{2`~e2?7uOZyIwwHV54CZVysI`u}nQ7k7Xjcy+)t z7$iw`@*ikUaud`6xXS-<=}0!K=EB8J{f$fHNkhpO9ETubL^iS!Ic72XSKXBM)Bk`a zhI56oVUDs+m-q5BuanJ)Vnh$3rMBgNi>z>=9?k`b&zFW835+0$9e@N{N2-7@Tydtu z5;uq@hECazi3@CfkTVgc=m}%vAAV_1KOJHn2go(D{gA$A{=Pv+#)N3>eQcX-Opbaq zzX^CU>Ys}tnW_{jWFN94ApGo-G7pB+nyczT$8@v6xxv#%K(2SU`>BAJXm<3O%j?4_}t9oh+(61%0XiLkaL( z_U&pBb0r7BKlK=n! diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 1bbab1f45..fb3b35ca7 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -5,7 +5,7 @@ minStatue : true, skin : 'blue', durationTime : 1000 - } + }; var options = $.extend(defaults, options); this.each(function(){ @@ -13,17 +13,13 @@ var thisBox = $(this), closeBtn = thisBox.find('.close_btn' ), show_btn = thisBox.find('.show_btn' ), - sideContent = thisBox.find('.side_content'), - sideList = thisBox.find('.side_list') - ; + sideContent = thisBox.find('.side_content'); var defaultTop = thisBox.offset().top; //????????top - thisBox.css(options.float, 0); if(options.minStatue == "true"){ - $(".show_btn").css("float", options.float); + show_btn.css("float", options.float); sideContent.css('width', 0); show_btn.css('width', 25); - } //close closeBtn.bind("click",function(){ @@ -37,26 +33,12 @@ sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); cookiesave('minStatue','false','','',''); }); - - - }); //end this.each }; })(jQuery); - -$(function(){ - $("#button1").click(function(){ - myTips("<%= l(:label_feedback_success) %>","success"); - }); - -}); - function f_submit() { -// var subject = $("#memo_subject").val(); -// var content = $("#memo_content").val(); -// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"..."); $("#new_memo").submit(); } @@ -68,11 +50,8 @@ function cookiesave(n, v, mins, dn, path) if(!mins) mins = 365 * 24 * 60; if(!path) path = "/"; var date = new Date(); - date.setTime(date.getTime() + (mins * 60 * 1000)); - var expires = "; expires=" + date.toGMTString(); - if(dn) dn = "domain=" + dn + "; "; document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; @@ -86,34 +65,31 @@ function cookieget(n) var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(name) == 0){ - return c.substring(name.length,c.length);} - + return c.substring(name.length,c.length); + } } return false; } $(function(){ + $(".closeSidebar").click(function(){ + $(".show_btn").css("display","none"); + $("#scrollsidebar").css("display","none"); + return false; + }); + $("#button1").click(function(){ - myTips("<%= l(:label_feedback_success) %>","success"); + myTips("反馈成功","success"); }); -}); - - -$(document).ready(function () { - $(function () { - $("#scrollsidebar").fix({ - float: 'right', //default.left or right - minStatue: cookieget('minStatue'), - skin: 'green', //default.gray or blue - durationTime: 600 - }); + $("#scrollsidebar").fix({ + float: 'right', //default.left or right + minStatue: cookieget('minStatue'), + skin: 'green', //default.gray or blue + durationTime: 600 }); -}); - -$(document).ready(function(){ $("#subject").keydown(function(){ var curLength=$("#subject").val().length; if(curLength>50){ @@ -123,8 +99,7 @@ $(document).ready(function(){ else{ $("#textCount").text(50-$("#subject").val().length) } - }) - $("#subject").keyup(function(){ + }).keyup(function(){ var curLength=$("#subject").val().length; if(curLength>50){ var num=$("#subject").val().substr(0,50); @@ -133,5 +108,5 @@ $(document).ready(function(){ else{ $("#textCount").text(50-$("#subject").val().length) } - }) -}) \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index ed872936e..1022d5aa2 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -711,7 +711,7 @@ html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} -.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;} .show_btn span { display:none;} .close_btn{width:24px;height:24px;cursor:pointer;} .side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } @@ -721,20 +721,21 @@ html{ overflow-x:hidden;} .close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} .close_btn span { display:none;} .side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} -.msgserver { margin-top:5px;} -.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; } +.msgserver { margin:10px 0 0px 5px;} +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; } .opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} -a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} -a:hover.opnionButton{background: #0fa9bb; } +a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;} +a.opnionButton:hover{background: #297fb8; } /* blue skin as the default skin */ .side_title {background-position:-195px 0;} .side_center {background:url(../images/blue_line.png) repeat-y center; } .side_bottom {background-position:-195px -50px;} -a.close_btn {background-position:-44px 0;} -a:hover.close_btn {background-position:-66px 0;} +.close_btn {background-position:-44px 0;} +.close_btn:hover {background-position:-66px 0;} .show_btn {background-position:-119px 0;} -.msgserver a {color:#15bccf; } +.msgserver a {color:#269ac9; } .msgserver a:hover { text-decoration:underline; } +.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;} /***** Ajax indicator ******/ diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index d8285709f..3031a964e 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -714,7 +714,7 @@ html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} -.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;} .show_btn span { display:none;} .close_btn{width:24px;height:24px;cursor:pointer;} .side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } @@ -724,21 +724,21 @@ html{ overflow-x:hidden;} .close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} .close_btn span { display:none;} .side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} -.msgserver { margin-top:5px;} -/*.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }*/ -.msgserver a { padding-left:4px; height:21px; display:block; } +.msgserver { margin:10px 0 0px 5px;} +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; } .opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} -a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} -a:hover.opnionButton{background: #0fa9bb; } +a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;} +a.opnionButton:hover{background: #297fb8; } /* blue skin as the default skin */ .side_title {background-position:-195px 0;} .side_center {background:url(../images/blue_line.png) repeat-y center; } .side_bottom {background-position:-195px -50px;} -a.close_btn {background-position:-44px 0;} -a:hover.close_btn {background-position:-66px 0;} +.close_btn {background-position:-44px 0;} +.close_btn:hover {background-position:-66px 0;} .show_btn {background-position:-119px 0;} -.msgserver a {color:#15bccf; } +.msgserver a {color:#269ac9; } .msgserver a:hover { text-decoration:underline; } +.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;} .hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} From 4c71e2c2562e101cd6097b7fad38c940f2716504 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 11:44:02 +0800 Subject: [PATCH 73/93] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=8F=90=E7=A4=BAJS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 11 ++++++++++- app/views/projects/new.html.erb | 19 +++++++++++++++---- config/locales/projects/zh.yml | 3 +++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f0ce70dc2..41f25d1a3 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -95,7 +95,16 @@ module ProjectsHelper end # 项目类型描述 - + def project_newtype_descrption + case params + when 1 + value = l(:label_type_des_development) + when 2 + value = l(:label_type_des_research) + when 3 + value = l(:label_type_des_friend) + end + end # 被邀请成员的状态 def status_for_ivitied(ivite_list, project) diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index f78bbf0c5..e57afe0ad 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -17,7 +17,8 @@
  • - <%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %>为团队提供系列在线开发工具! + <%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %> + 为团队提供系列在线开发工具!
  • @@ -90,12 +91,22 @@ } } - $(document).ready(function(){ + $(function(){ $('#project_new_type').change(function(){ - alert($(this).children('option:selected').val("开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。")); - var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值 + var type = $('#project_new_type').val(); + if(type == '1'){ + $(this).next().html("<%= l(:label_type_des_development)%>"); + } + else if(type == '2'){ + $(this).next().html("<%= l(:label_type_des_research)%>"); + } + else if(type == '3'){ + $(this).next().html("<%= l(:label_type_des_friend)%>"); + } +// var p1=$(this).children('option:selected').val("研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。");//这就是selected的值 // var p2=$('#param2').val();//获取本页面其他标签的值 }) + }) diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index b4234f358..dbce93219 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -61,6 +61,9 @@ zh: label_research_group: 研讨模式 label_development_team: 开发模式 label_type_project: 项目类型 + label_type_des_development: 开发模式:面向小组开发,支持问题跟踪、代码托管、论坛交流等所有功能。 + label_type_des_research: 研讨模式:面向小组研究,支持任务分工、论坛交流、资源分享等。 + label_type_des_friend: 圈子模式:面向好友分享,支持论坛交流、资源分享等。 label_member: 成员 project_module_attachments: 资源 From 38a24e8fe4b95061a35f492a95e1b01644f12bde Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 12:17:14 +0800 Subject: [PATCH 74/93] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 114 +++++++++++++++----------------- public/stylesheets/new_user.css | 1 + 2 files changed, 53 insertions(+), 62 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 57b6875e5..81758ff97 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -1,4 +1,4 @@ -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","forum" %> +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
    @@ -53,75 +71,47 @@
    -
    - <%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f|%> - <%= f.hidden_field :subject, :required => true, value: @memo.subject %> - <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> - <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> - -

    -
    - 取消 - 留言 - <% end %> -
    -
    - <% @replies.each do |reply| %> -
    -
    - - <%= link_to image_tag(url_to_avatar(reply.author), :width => 45,:height => 45), user_path(reply.author) %> +
    +
    回复(<%=@reply_count %>)
    +
    + -
    -
    <%= reply.author.name%> - <% if reply.parent && reply.parent.id != @memo.id%> - 回复<%= reply.parent.author.name%> - <% end %> - - <%= format_date(reply.created_at)%> - - <%= link_to( - l(:button_delete), - {:action => 'destroy', :id => reply}, - :method => :delete, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete),:class=>'replyGrey fr ml10' - ) if reply.destroyable_by?(User.current) %> - 回复
    +
    +
    + <% @replies.each_with_index do |reply,i| %> +
    +
    + <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %> +
    +
    +
    <%= reply.author.name%><%= format_date(reply.created_at) %>
    <%= reply.content.html_safe%>
    - +
    +
    + <% end %> +
    +
    +
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
    +
    +
    + <%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%> <%= f.hidden_field :subject, :required => true, value: @memo.subject %> <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> - -

    -
    - 取消 - 发布 - <% end %> -
    + +
    + +
    +

    + <% end%>
    - <% end %> - - - - - - - - - - -
    -
      - <%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false,:flag=>true %> -
    \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 859a5db27..b2330b18d 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -776,6 +776,7 @@ a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repe .postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;} .postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;} .pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;} +.homepagePostReplyInput {width:543px; height:33px; max-width:543px; max-height:33px; border:1px solid #d9d9d9; outline:none;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} From 9f22eed093cb1da79befd65a7199c93ed2198002 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 13:38:40 +0800 Subject: [PATCH 75/93] =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=9A=84=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=B9=9F=E8=A6=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index f3c383573..4181090a5 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -156,7 +156,8 @@ class MemosController < ApplicationController if( #@memo.update_column(:subject, params[:memo][:subject]) && @memo.update_column(:content, params[:memo][:content]) && @memo.update_column(:sticky, params[:memo][:sticky]) && - @memo.update_column(:lock, params[:memo][:lock])) + @memo.update_column(:lock, params[:memo][:lock]) && + @memo.update_column(:subject,params[:memo][:subject])) @memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads])) @memo.save # @memo.root.update_attribute(:updated_at, @memo.updated_at) From 032ccdb2b85e7fec1517b34b8b10c06274ebbcbc Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 14:01:29 +0800 Subject: [PATCH 76/93] =?UTF-8?q?=E5=85=88=E5=BB=BA=E9=A1=B9=E7=9B=AE=20--?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B=E9=BB=98=E8=AE=A4=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index e57afe0ad..66d933adc 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -18,7 +18,7 @@
  • <%= select_tag :project_new_type, options_for_select([["开发模式", "1"], ["研讨模式", "2"], ["圈子模式", "3"]]) %> - 为团队提供系列在线开发工具! + <%=l(:label_type_des_development) %>
  • From f4cad2897a4ccc6359f1b0955a936d6a63b6c5a3 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Thu, 24 Sep 2015 14:48:48 +0800 Subject: [PATCH 77/93] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=80=81=E5=B8=88?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E4=BD=9C=E5=93=81=E8=AF=84=E9=98=85=E5=92=8C?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E4=BD=9C=E5=93=81=E8=AF=84=E9=98=85=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=92=8C=E6=A0=B7=E5=BC=8F=202.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=80=81=E5=B8=88=E5=85=B3=E9=97=AD=E4=BD=9C=E5=93=81=E8=AF=84?= =?UTF-8?q?=E9=98=85=E5=92=8C=E5=BC=80=E5=90=AF=E4=BD=9C=E5=93=81=E8=AF=84?= =?UTF-8?q?=E9=98=85=E7=9A=84tips=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 86 ++++++++++++-------------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index c7895efb7..8f64d6c29 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -224,61 +224,57 @@
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> - - <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %> -
      -
    • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
    • -
    • <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布的作业:
    • - <% if ma.viewed == 0 %> -
    • - <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), - :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", - :onmouseover =>"message_titile_show($(this),event)", - :onmouseout => "message_titile_hide($(this))" %> -
    • - -
    •    开启匿评了!
    • - <% else %> -
    • - <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", - :onmouseover =>"message_titile_show($(this),event)", - :onmouseout => "message_titile_hide($(this))"%> -
    • - - <% end %> -
    • <%= time_tag(ma.created_at).html_safe %>
    • -
    - <% end %> + + <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %> +
      +
    • + <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %> +
    • +
    • + <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + ">启动了作业匿评: +
    • +
    • + <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", + :onmouseover => "message_titile_show($(this),event)", + :onmouseout => "message_titile_hide($(this))" %> +
    • + +
    • <%= time_tag(ma.created_at).html_safe %>
    • +
    + <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
    • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
    • -
    • <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布的作业:
    • - <% if ma.viewed == 0 %> -
    • - <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), - :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", - :onmouseover =>"message_titile_show($(this),event)", - :onmouseout => "message_titile_hide($(this))" %> -
    • - -
    •    匿评已经关闭!
    • - <% else %> +
    • + <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">关闭了作业匿评:
    • - <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", + <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))"%>
    • - <% end %>
    • <%= time_tag(ma.created_at).html_safe %>
    <% end %> From 0b4c8b05f12c7e6d41f05f8523ed572943327cfe Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 24 Sep 2015 15:09:15 +0800 Subject: [PATCH 78/93] =?UTF-8?q?JAVA=E8=AF=AD=E8=A8=80=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_detail_programing.rb | 2 +- .../users/_user_programing_attr.html.erb | 2 +- db/schema.rb | 3412 +++++++++-------- public/javascripts/homework.js | 27 + 4 files changed, 1737 insertions(+), 1706 deletions(-) diff --git a/app/models/homework_detail_programing.rb b/app/models/homework_detail_programing.rb index 2877ed6c1..0c445d672 100644 --- a/app/models/homework_detail_programing.rb +++ b/app/models/homework_detail_programing.rb @@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base belongs_to :homework_common def language_name - %W(C C++ Python).at(self.language.to_i - 1) + %W(C C++ Python Java).at(self.language.to_i - 1) end end diff --git a/app/views/users/_user_programing_attr.html.erb b/app/views/users/_user_programing_attr.html.erb index 970867c43..e0bee689a 100644 --- a/app/views/users/_user_programing_attr.html.erb +++ b/app/views/users/_user_programing_attr.html.erb @@ -4,7 +4,7 @@
    <% if edit_mode && homework.is_program_homework? %> diff --git a/db/schema.rb b/db/schema.rb index 40daded12..0b2bfd386 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,1704 +1,1708 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20150918134804) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_review_user_settings", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "mail_notification", :default => 0, :null => false - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - create_table "contest_notifications", :force => true do |t| - t.text "title" - t.text "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contesting_projects", :force => true do |t| - t.integer "project_id" - t.string "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contesting_softapplications", :force => true do |t| - t.integer "softapplication_id" - t.integer "contest_id" - t.integer "user_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - end - - create_table "contestnotifications", :force => true do |t| - t.integer "contest_id" - t.string "title" - t.string "summary" - t.text "description" - t.integer "author_id" - t.integer "notificationcomments_count" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "contests", :force => true do |t| - t.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 - t.integer "lft" - t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - add_index "documents", ["created_on"], :name => "index_documents_on_created_on" - add_index "documents", ["project_id"], :name => "documents_project_id" - - create_table "dts", :primary_key => "Num", :force => true do |t| - t.string "Defect", :limit => 50 - t.string "Category", :limit => 50 - t.string "File" - t.string "Method" - t.string "Module", :limit => 20 - t.string "Variable", :limit => 50 - t.integer "StartLine" - t.integer "IPLine" - t.string "IPLineCode", :limit => 200 - t.string "Judge", :limit => 15 - t.integer "Review", :limit => 1 - t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 - t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" - add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" - - create_table "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "secret_key" - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "teacher_priority", :default => 1 - end - - create_table "homework_detail_manuals", :force => true do |t| - t.float "ta_proportion" - t.integer "comment_status" - t.date "evaluation_start" - t.date "evaluation_end" - t.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" - add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" - - create_table "homework_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "mail" - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - - create_table "journal_replies", :id => false, :force => true do |t| - t.integer "journal_id" - t.integer "user_id" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.datetime "updated_on" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.string "logo_link" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false - t.integer "parent_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "identifier" - t.integer "status", :default => 1, :null => false - t.integer "lft" - t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false - t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 - t.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "rich_rich_files", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "rich_file_file_name" - t.string "rich_file_content_type" - t.integer "rich_file_file_size" - t.datetime "rich_file_updated_at" - t.string "owner_type" - t.integer "owner_id" - t.text "uri_cache" - t.string "simplified_type", :default => "file" - end - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 - t.boolean "is_test", :default => false - end - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "description" - t.string "subject" - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - end - - add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" - add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" - add_index "users", ["type"], :name => "index_users_on_type" - - create_table "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20150918134804) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + create_table "contest_notifications", :force => true do |t| + t.text "title" + t.text "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contesting_projects", :force => true do |t| + t.integer "project_id" + t.string "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contesting_softapplications", :force => true do |t| + t.integer "softapplication_id" + t.integer "contest_id" + t.integer "user_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + end + + create_table "contestnotifications", :force => true do |t| + t.integer "contest_id" + t.string "title" + t.string "summary" + t.text "description" + t.integer "author_id" + t.integer "notificationcomments_count" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "contests", :force => true do |t| + t.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + t.integer "status", :default => 1 + t.integer "attachmenttype", :default => 2 + t.integer "lft" + t.integer "rgt" + t.integer "is_public", :limit => 1, :default => 1 + t.integer "inherit_members", :limit => 1, :default => 1 + t.integer "open_student", :default => 0 + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + + create_table "discuss_demos", :force => true do |t| + t.string "title" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "documents", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + create_table "dts", :force => true do |t| + t.string "IPLineCode" + t.string "Description" + t.string "Num" + t.string "Variable" + t.string "TraceInfo" + t.string "Method" + t.string "File" + t.string "IPLine" + t.string "Review" + t.string "Category" + t.string "Defect" + t.string "PreConditions" + t.string "StartLine" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" + add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" + + create_table "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "secret_key" + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "teacher_priority", :default => 1 + end + + create_table "homework_detail_manuals", :force => true do |t| + t.float "ta_proportion" + t.integer "comment_status" + t.date "evaluation_start" + t.date "evaluation_end" + t.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id" + add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id" + + create_table "homework_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "mail" + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :force => true do |t| + t.integer "journal_id", :default => 0, :null => false + t.string "property", :limit => 30, :default => "", :null => false + t.string "prop_key", :limit => 30, :default => "", :null => false + t.text "old_value" + t.text "value" + end + + add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" + + create_table "journal_replies", :id => false, :force => true do |t| + t.integer "journal_id" + t.integer "user_id" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "onclick_times", :force => true do |t| + t.integer "user_id" + t.datetime "onclick_time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.string "logo_link" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + t.string "homepage", :default => "" + t.boolean "is_public", :default => true, :null => false + t.integer "parent_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "identifier" + t.integer "status", :default => 1, :null => false + t.integer "lft" + t.integer "rgt" + t.boolean "inherit_members", :default => false, :null => false + t.integer "project_type" + t.boolean "hidden_repo", :default => false, :null => false + t.integer "attachmenttype", :default => 1 + t.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + + create_table "roles", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.float "system_score", :default => 0.0 + t.boolean "is_test", :default => false + end + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + + create_table "system_messages", :force => true do |t| + t.integer "user_id" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "description" + t.string "subject" + end + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + t.integer "gid" + end + + add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" + add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" + add_index "users", ["type"], :name => "index_users_on_type" + + create_table "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index c6fb2e9c7..546d8b674 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -153,6 +153,8 @@ $(function(){ language = 'C++'; }else if($('select.language_type').val() == 3){ language = 'Python'; + }else if($('select.language_type').val() == 4){ + language = 'Java'; } if (valid) { @@ -199,8 +201,33 @@ $(function(){ program_name = 'text/x-c++src'; }else if(language==3){ program_name = 'text/x-cython'; + } else if(language==4){ + program_name = 'text/x-java'; } + if ($('#program-src').val().length<=0) { + if(language==4) + $('#program-src').val('\ +import java.io.*;\n\ +import java.util.*;\n\ +\n\ +//请一定不要修改类名\n\ +class Main\n\ +{\n\ + public static void main (String args[])\n\ + {\n\ + //获取参数方式\n\ + //Scanner in = new Scanner(System.in);\n\ + //int a = in.nextInt();\n\ + //int b = in.nextInt();\n\ +\n\ + //您的代码\n\ + }\n\ +}\n\ +'); + + }; + var editor = CodeMirror.fromTextArea(document.getElementById("program-src"), { mode: {name: program_name, version: 2, From a42152553b69cdb8d15d800409e6f4e9c88d2bf3 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Thu, 24 Sep 2015 15:26:54 +0800 Subject: [PATCH 79/93] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/homework.js | 56 +++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 546d8b674..d897ba5e9 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -206,8 +206,9 @@ $(function(){ } if ($('#program-src').val().length<=0) { - if(language==4) - $('#program-src').val('\ + var src = ''; + if(language==4){ + src = '\ import java.io.*;\n\ import java.util.*;\n\ \n\ @@ -224,8 +225,55 @@ class Main\n\ //您的代码\n\ }\n\ }\n\ -'); - +'; + } + else if(language==1){ + src = '#include \n\ +\n\ +int main()\n\ +{\n\ + //获取参数方式 scanf\n\ + //int x =0;\n\ + //int y = 0;\n\ + //scanf("%d", &x);\n\ +\n\ + //结果输出使用prinf\n\ + //printf("%d",x);\n\ +\n\ + return 0;\n\ +}\n\ +'; + } else if(language==2){ +src = '\ +#include \n\ +using namespace std;\n\ +\n\ +int main()\n\ +{\n\ + //获取参数方式 cin\n\ + //int x =0;\n\ + //cin >> x;\n\ +\n\ + //结果输出使用 cout\n\ + //cout<<"1";\n\ +\n\ + return 0;\n\ +}\n\ +'; + } else if(language==3){ +src = '\ +import sys \n\ +\n\ +#获取参数方式,使用raw_input\n\ +#input = raw_input()\n\ +#a, b = input.split()\n\ +\n\ +#结果输出使用 print \n\ +#print (str(int(a)+int(b)))\n\ +'; + } + + $('#program-src').val(src); }; var editor = CodeMirror.fromTextArea(document.getElementById("program-src"), { From 2aa52bfc59e54b8f9387322e2233cab723b436eb Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 16:02:15 +0800 Subject: [PATCH 80/93] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E7=BF=BB=E9=A1=B5=20?= =?UTF-8?q?=E6=AF=8F=E9=A1=B5=E9=83=BD=E8=A6=81=E5=8A=A0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 2fba3af1b..34c7d6e64 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -127,7 +127,7 @@ <%= render :partial => 'show_topics',:locals => {:memos=>@memos}%>
      - <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => false, :remote => true, :flag => true %> + <%= pagination_links_full @topic_pages, @topic_count ,:per_page_links => true, :remote => true, :flag => true %>
    From 38ba47f8c8b799b88777d615fddd74515a379333 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 16:16:37 +0800 Subject: [PATCH 81/93] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BF=AE=E6=94=B9=20=E4=BB=BB=E5=8A=A1=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E8=87=AA=E5=8A=A8=E5=BC=80=E5=90=AF?= =?UTF-8?q?/=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=20=E5=8C=BF=E8=AF=84=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 1 + .../20150924063215_add_reply_id_to_message.rb | 5 ++++ lib/tasks/homework_evaluation.rake | 28 +++++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20150924063215_add_reply_id_to_message.rb diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index f9b5b7d32..8d2cb63aa 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -160,6 +160,7 @@ class MessagesController < ApplicationController @reply.safe_attributes = params[:reply] @reply.content = @quote + @reply.content @reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject] + @reply.reply_id = @message.author @topic.children << @reply user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first user_activity.updated_at = Time.now diff --git a/db/migrate/20150924063215_add_reply_id_to_message.rb b/db/migrate/20150924063215_add_reply_id_to_message.rb new file mode 100644 index 000000000..b55449ad7 --- /dev/null +++ b/db/migrate/20150924063215_add_reply_id_to_message.rb @@ -0,0 +1,5 @@ +class AddReplyIdToMessage < ActiveRecord::Migration + def change + add_column :messages, :reply_id, :integer + end +end diff --git a/lib/tasks/homework_evaluation.rake b/lib/tasks/homework_evaluation.rake index af833448d..75166391d 100644 --- a/lib/tasks/homework_evaluation.rake +++ b/lib/tasks/homework_evaluation.rake @@ -25,9 +25,25 @@ namespace :homework_evaluation do end end homework_detail_manual.update_column('comment_status', 2) - # 匿评开启消息邮件通知 + # 匿评开启消息邮件通知,# 所有人 + course = homework_common.course + course.members.each do |m| + homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2) + end + # 邮件通知 + Mailer.send_mail_anonymous_comment_close(homework_common).deliver else - #作业数小于2,启动失败 + #作业数小于2,启动失败, 只给老师发 + # status==4 发送失败 + # 匿评开启消息邮件通知,# 所有人 + course = homework_common.course + course.members.each do |m| + if m.user.allowed_to?(:as_teacher,course) + homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 4) + end + end + # 邮件通知 + # Mailer.send_mail_anonymous_comment_close(homework_common).deliver end end end @@ -47,7 +63,13 @@ namespace :homework_evaluation do student_work.save end homework_detail_manual.update_column('comment_status', 3) - # 匿评关闭消息邮件通知 + # 匿评关闭消息通知 给所有人发 + course = homework_common.course + course.members.each do |m| + homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 3) + end + # 邮件通知 + Mailer.send_mail_anonymous_comment_close(homework_common).deliver end end end From 6807f649bf932df26838373741101714f0e8a231 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 24 Sep 2015 16:17:50 +0800 Subject: [PATCH 82/93] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=A4=B4=E5=83=8F=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E4=B8=80=E6=A0=B7=202=E3=80=81=E5=8C=BF=E8=AF=84=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=8F=AF=E4=BB=A5=E5=9C=A8=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- app/views/student_work/_evaluation_un_work.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e100a8fc9..cfb655baa 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2356,8 +2356,8 @@ module ApplicationHelper if work.nil? link_to "提交作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else - if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 - link_to "作品已交", "", :class => 'c_blue', :title => "开启匿评后不可修改作品" + if homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 + link_to "作品已交", "javascript:void(0)", :class => 'c_blue', :title => "开启匿评后不可修改作品" elsif homework.homework_type == 2 #编程作业不能修改作品 link_to "修改作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index ff2420a1a..da2723636 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -3,7 +3,7 @@
    • - <%= link_to(image_tag(url_to_avatar(User.current),:width =>"40",:height => "40"),user_activities_path(User.current.id))%> + <%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(User.current.id))%>
    • From 6b98b2a273601cda9f04cf3c38ad13fa895dc4c9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 24 Sep 2015 16:17:50 +0800 Subject: [PATCH 83/93] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=9A=84=E9=93=BE=E6=8E=A5=20=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E6=89=8B=E5=9E=8B=E5=85=89=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_forums.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index e6fe778f4..0a377b1e5 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -145,7 +145,7 @@
      <%= @forum.description%> @@ -182,12 +182,12 @@
      From fcf34b5918152f4dcd99dbfa3ff01b8e502778e1 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 16:38:36 +0800 Subject: [PATCH 84/93] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E2=80=9C=E7=A7=81=E6=9C=89=E2=80=9D?= =?UTF-8?q?=20=E2=80=9C=E5=85=AC=E5=BC=80=E2=80=9D=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 | 1 + app/models/message.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 414ef6d70..251c47d4c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -189,6 +189,7 @@ class ProjectsController < ApplicationController @project.organization_id = params[:organization_id] @project.user_id = User.current.id @project.project_new_type = params[:project_new_type] + params[:project][:is_public] ? @project.is_public = 1 : @project.is_public = 0 if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/models/message.rb b/app/models/message.rb index 37129885f..2c46857f8 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -86,7 +86,7 @@ class Message < ActiveRecord::Base } - safe_attributes 'subject', 'content' + safe_attributes 'subject', 'content', 'reply_id' safe_attributes 'board_id','locked', 'sticky', :if => lambda {|message, user| if message.project From 25a604d7b8d49b9bf5f75d2559a786010c57823c Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 16:59:19 +0800 Subject: [PATCH 85/93] =?UTF-8?q?issue=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 118 ++++++++------------------------- db/schema.rb | 13 +++- 2 files changed, 38 insertions(+), 93 deletions(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 2b706be7f..76467275d 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,4 +1,4 @@ -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> +<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg' %>

      <%= l(:label_issue_edit) %>

      @@ -12,7 +12,6 @@
      <%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
      -

      @@ -21,59 +20,32 @@


      - 由<%= @issue.author %>添加于 <%= format_time(@issue.created_on).html_safe %> +

      <%= @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 %>

      - '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 %> -
      - <% end -%> - - +
      + + + <%= link_to_attachment_project @issue, :thumbnails => true %>
      + <% end -%> <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> -
      -
      - - -<<<<<<< .mine - <%= render :partial => 'attributes_show' %> - - - - - - - - - - - - - - - - - - - - - - - - - - -======= +
      +
      +
      <%= issue_fields_rows do |rows| %>
        @@ -101,18 +73,7 @@ <% end %>
      ->>>>>>> .theirs -<<<<<<< .mine - <%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %> - - - - - - -
      -=======
        <% unless @issue.disabled_core_fields.include?('start_date') %>
      •  开始  : 

        @@ -121,33 +82,6 @@
      • <% end %>
        ->>>>>>> .theirs -<<<<<<< .mine - - - - - - - - - - - - - - - - - - - - - - - - -======= <% unless @issue.disabled_core_fields.include?('estimated_hours') %>
      •  周期  : 

        <%= l_hours(@issue.estimated_hours) %> @@ -172,23 +106,28 @@ <% end %> <%#= render_custom_fields_rows(@issue) %> <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> ->>>>>>> .theirs -
      - +
      + +
      + <%= 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"}%>
    • @@ -199,7 +138,6 @@ <%= render :partial => 'changesets', :locals => {:changesets => @changesets} %> <% end %> -
      <% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> diff --git a/db/schema.rb b/db/schema.rb index 40daded12..b364ed83e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150918134804) do +ActiveRecord::Schema.define(:version => 20150924063215) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150918134804) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + create_table "discuss_demos", :force => true do |t| + t.string "title" + t.text "body" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "documents", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false @@ -895,6 +902,7 @@ ActiveRecord::Schema.define(:version => 20150918134804) do t.datetime "updated_on", :null => false t.boolean "locked", :default => false t.integer "sticky", :default => 0 + t.integer "reply_id" end add_index "messages", ["author_id"], :name => "index_messages_on_author_id" @@ -912,7 +920,6 @@ ActiveRecord::Schema.define(:version => 20150918134804) do t.datetime "created_on" t.integer "comments_count", :default => 0, :null => false t.integer "course_id" - t.datetime "updated_on" end add_index "news", ["author_id"], :name => "index_news_on_author_id" @@ -1324,7 +1331,7 @@ ActiveRecord::Schema.define(:version => 20150918134804) do t.datetime "updated_at", :null => false t.integer "late_penalty", :default => 0 t.integer "absence_penalty", :default => 0 - t.float "system_score", :default => 0.0 + t.integer "system_score" t.boolean "is_test", :default => false end From b66de0ee9fe938fc57b5b5904c549deb1d1123da Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 17:03:43 +0800 Subject: [PATCH 86/93] =?UTF-8?q?issue=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 111 ++++++++------------------------- 1 file changed, 26 insertions(+), 85 deletions(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 76467275d..67867e2c6 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,4 +1,4 @@ -<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg' %> +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>

      <%= l(:label_issue_edit) %>

      @@ -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,114 +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 %> -
      - + <% end -%> + +
      + + + <%= link_to_attachment_project @issue, :thumbnails => true %>
      <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> -
      -
      - -
      - <%= issue_fields_rows do |rows| %> -
        -
      •  状态  : 

        +
      +
      -

      <%= @issue.status.name %>

      - -
      - <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
    •  指派给  : 

      - <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> -
    • - <% end %> -
      -
    -
      -
    •  优先级  : 

      - <%= @issue.priority.name %> -
    • -
      - <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
    •  % 完成  : 

      - <%= @issue.done_ratio %>% -
    • - <% end %> -
      -
    + + <%= render :partial => 'attributes_show' %> + -
      - <% unless @issue.disabled_core_fields.include?('start_date') %> -
    •  开始  : 

      + <%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %> + + +
      + -

      <%= format_date(@issue.start_date) %>

      -
    • - <% end %> -
      - <% unless @issue.disabled_core_fields.include?('estimated_hours') %> -
    •  周期  : 

      - <%= l_hours(@issue.estimated_hours) %> -
    • - <% 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) %> - - -
    - <%= 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"}%> @@ -138,6 +78,7 @@ <%= render :partial => 'changesets', :locals => {:changesets => @changesets} %> <% end %> +
    <% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> From a3840ebad9fc6c6df03d3f07d95b485bcd6e2e3f Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Thu, 24 Sep 2015 17:11:39 +0800 Subject: [PATCH 87/93] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=A4=B1=E8=B4=A5=E5=AF=B9=E5=BA=94=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index 8f64d6c29..d536b6ed7 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -279,6 +279,34 @@ <% end %> + <% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %> +
      +
    • + <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %> +
    • +
    • + <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + ">启动作业匿评失败 +
    • +
    • + <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", + :onmouseover => "message_titile_show($(this),event)", + :onmouseout => "message_titile_hide($(this))" %> +
    • + +
    • <%= time_tag(ma.created_at).html_safe %>
    • +
    + <% end %> + <% if ma.course_message_type == "Poll" %>
    • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
    • From 1e8cb91ab43253f451960f9752ee1b34aefa0586 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 24 Sep 2015 17:18:58 +0800 Subject: [PATCH 88/93] boards --- app/controllers/messages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 8d2cb63aa..2c7df84cf 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -160,7 +160,7 @@ class MessagesController < ApplicationController @reply.safe_attributes = params[:reply] @reply.content = @quote + @reply.content @reply.subject = "RE: #{@topic.subject}" unless params[:reply][:subject] - @reply.reply_id = @message.author + # @reply.reply_id = params[:id] @topic.children << @reply user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first user_activity.updated_at = Time.now From e60119d6d360b7a31d6341b6311cf9c44e15482a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Sep 2015 08:59:34 +0800 Subject: [PATCH 89/93] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B6=88=E6=81=AF=E4=B8=AD=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_messages.html.erb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb index d536b6ed7..6ee5f729a 100644 --- a/app/views/users/user_messages.html.erb +++ b/app/views/users/user_messages.html.erb @@ -359,10 +359,20 @@ <% end %> <% if ma.course_message_type == "StudentWorksScore" %>
        -
      • <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
      • +
      • + <% if ma.course_message.reviewer_role == 3 %> + <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %> + <% else %> + <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %> + <% end %> +
      • - <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", - user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + <% if ma.course_message.reviewer_role == 3 %> + 匿名用户 + <% else %> + <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", + user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + <% end %> "> <%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %> From c1bd17b07e397da22a88cfb9f2305123393289fa Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 09:44:15 +0800 Subject: [PATCH 90/93] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=BA=E5=9D=9B?= =?UTF-8?q?=E5=8F=91=E5=B8=96=E6=8E=92=E5=BA=8F=E6=AF=94=E8=BE=83=E4=B9=B1?= =?UTF-8?q?=E3=80=82=20=E5=8E=BB=E6=8E=89=E7=BD=AE=E9=A1=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=88=E5=8F=91=E5=B8=96=E7=9A=84=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=87=8C=E5=8E=9F=E6=9D=A5=E6=9C=89=E7=BD=AE=E9=A1=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E3=80=82=E7=8E=B0=E5=9C=A8=E6=B2=A1=E6=9C=89=E4=BA=86?= =?UTF-8?q?=E3=80=82=E6=89=80=E4=BB=A5=E6=8E=92=E5=BA=8F=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E5=8F=96=E6=B6=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 3 ++- app/views/boards/_project_show.html.erb | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 53fb21b8c..434ea4470 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -101,8 +101,9 @@ class BoardsController < ApplicationController @topic_count = @board ? @board.topics.count : 0 if @project @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] + #现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC, @topics = @board.topics. - reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc"). + reorder("#{Message.table_name}.created_on desc"). includes(:last_reply). limit(@topic_pages.per_page). offset(@topic_pages.offset). diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 3cfd4ae72..4f022261f 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -51,9 +51,9 @@ :data => {:confirm => l(:text_are_you_sure)}, :class => 'talk_edit fr', :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %> - <% if topic.sticky? %> - <%= l(:label_board_sticky)%> - <% end %> + <%# if topic.sticky? %> + + <%# end %> From 80bf8d83f322d724087acc71c02460763ef6e5fe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 25 Sep 2015 10:38:26 +0800 Subject: [PATCH 93/93] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=92=8C=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90=20js=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=88=86=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index eb2597127..34f7452a7 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -223,7 +223,7 @@ }); } - <%= if @course %> + <% if @course %> var tagNameHtml; //当前双击的链接的父节点的html var tagName; //标签的值 var parentCssBorder; //当前双击的链接的父节点