From dae15840b8b5f79f86581782130ff3cd9963af24 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 7 Jul 2015 14:45:46 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=96=B0=E6=B3=A8=E5=86=8C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=82=AE=E4=BB=B6=E9=BB=98=E8=AE=A4=E7=BC=BA=E7=9C=81?= =?UTF-8?q?=E5=80=BC=E6=8C=89=E5=A4=A9=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index b4723cceb..005c394a8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -66,9 +66,9 @@ class User < Principal #每日一报、一事一报、不报 MAIL_NOTIFICATION_OPTIONS = [ - ['all', :label_user_mail_option_all], #['week', :label_user_mail_option_week], ['day', :label_user_mail_option_day], + ['all', :label_user_mail_option_all], ['none', :label_user_mail_option_none] ] From c246405e96e78af867a0861c3db58b3128199452 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 7 Jul 2015 16:25:59 +0800 Subject: [PATCH 02/15] =?UTF-8?q?issue=E6=98=BE=E7=A4=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/issues_helper.rb | 8 ++++---- app/views/issues/show.html.erb | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 4f0821449..6299603fa 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -83,16 +83,16 @@ module IssuesHelper end end - # 获取优先级样式 + # 获取优先级样式 value值1 2 低 def get_issue_priority(value) issuetype = [] - if value == "紧急" || value == 1 + if value == "紧急" || value == 4 issuetype << "red_btn_cir ml10" issuetype << "紧急" - elsif value == "正常" || value == 3 + elsif value == "正常" || value == 2 issuetype << "green_btn_cir ml10" issuetype << "正常" - elsif value == "高" || value == 4 + elsif value == "高" || value == 3 issuetype << "orange_btn_cir ml10" issuetype << "高" else diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index c008e78f2..23d295d81 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -14,8 +14,9 @@

- <%= @issue.subject %> - <%= get_issue_type(@issue.tracker_id)[1] %> + <%= get_issue_type(@issue.tracker_id)[1] %> + <%= @issue.subject %> + <%= get_issue_priority(@issue.priority_id)[1] %>


From ac0e774bcbbdc85534fc896cdf92aad033801637 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 8 Jul 2015 16:35:25 +0800 Subject: [PATCH 03/15] =?UTF-8?q?issue=E7=95=99=E8=A8=80=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_history.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 2ad36875c..68e991594 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -11,8 +11,8 @@

<% if journal.details.any? %> - <% details_to_strings(journal.details).each do |string| %> -

<%= string %>

+ <% details_to_strings(journal.details).each do |string| %> +

<%= string %>

<% end %> <% end %>

From dc4fb00819fb364f645b8cb103b0b6c58bb7b2bb Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 9 Jul 2015 10:42:29 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E3=80=81=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AD=97=E4=BD=93=E5=A4=AA=E5=B0=8F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 22 +++++++++++----------- app/views/boards/_project_show.html.erb | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 3e1530e3f..47de679c8 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -32,20 +32,20 @@
<% end %> -

讨论区共有<%= @topic_count %>个帖子

+

讨论区共有<%= @topic_count %>个帖子

<% if @topics.any? %> <% @topics.each do |topic| %>
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> -
+
<% author = topic.author.to_s %>
- <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author, + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

  :

-

  <%= h(topic.subject) %>

+

  <%= h(topic.subject) %>

<% if topic.course_editable_by?(User.current) %> <%= l(:button_edit) %> @@ -101,7 +101,7 @@ // } }); -
+
<%= topic.content.html_safe %> @@ -122,7 +122,7 @@ <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %>
- <%= l(:button_reply) %> + <%= l(:button_reply) %>
@@ -165,15 +165,15 @@
  • <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
    - <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> + <%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %>
    -
    +
    <%= textAreailizable message,:content,:attachments => message.attachments %>

    - <%= format_time(message.created_on) %> + <%= format_time(message.created_on) %> <%= link_to( l(:button_delete), @@ -181,13 +181,13 @@ :method => :post, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete), - :class => ' c_dblue fr' + :class => ' c_dblue fr f14' ) if message.course_destroyable_by?(User.current) %> <%= link_to( l(:button_reply), 'javascript:;', :nhname =>'showbtn_child_reply', - :class => ' c_dblue fr', + :class => ' c_dblue fr f14', :style => 'margin-right: 10px;', 'data-topic-id' =>message.id, :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %> diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index e7071d2a1..c3dd863d5 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -28,20 +28,20 @@
    -

    讨论区共有<%= @topic_count %>个帖子

    +

    讨论区共有<%= @topic_count %>个帖子

    <% if @topics.any? %> <% @topics.each do |topic| %>
    <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> -
    +
    <% author = topic.author.to_s %>
    - <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author, + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

      :

    -

      <%= h(topic.subject) %>

    +

      <%= h(topic.subject) %>

    <% if topic.editable_by?(User.current) %> <%= l(:button_edit) %> @@ -95,7 +95,7 @@
    -
    +
    <%= topic.content.html_safe %> @@ -111,7 +111,7 @@ <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %>
    <% if User.current.logged? %> - <%= l(:button_reply) %> + <%= l(:button_reply) %> <% end %>
  • <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
    - <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> + <%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %>
    -
    +
    <%= textAreailizable message,:content,:attachments => message.attachments %>

    - <%= format_time(message.created_on) %> + <%= format_time(message.created_on) %> <%= link_to( l(:button_delete), @@ -168,13 +168,13 @@ :method => :post, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete), - :class => ' c_dblue fr' + :class => ' c_dblue fr f14' ) if message.course_destroyable_by?(User.current) %> <%= link_to( l(:button_reply), 'javascript:;', :nhname =>'showbtn_child_reply', - :class => ' c_dblue fr', + :class => ' c_dblue fr f14', :style => 'margin-right: 10px;', :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
    From 06c2718b54960992896dff8567676a9d6e0eeda3 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 9 Jul 2015 11:09:29 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=95=99=E8=A8=80=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_history.html.erb | 8 ++++---- app/views/projects/_history.html.erb | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index 043bac947..d8e034161 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -6,12 +6,12 @@ <%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
    -
    +
    - <%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10', :target => "_blank"%> + <%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%> - + <%= format_time(journal.created_on) %>
    @@ -20,7 +20,7 @@

    -
    +
    <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index 54dda7b28..b31445fdc 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -4,15 +4,15 @@
    <%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
    -
    +
    - <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> - <%= format_time(journal.created_on) %> + <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %> + <%= format_time(journal.created_on) %>

    <%=journal.notes.html_safe%>

    -
    +
    <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if journal.user == User.current|| User.current.admin? %> <%= link_to(l(:label_bid_respond_delete), @@ -31,7 +31,7 @@
    <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if reply_allow %> -
    +
    <%= render :partial => 'words/new_respond_project', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
    <% end %> From f4132e6ee0e9b11fff23f03e13c857493e1de960 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 9 Jul 2015 11:35:57 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B1=E5=90=8C?= =?UTF-8?q?=E8=B4=B4=E5=90=A7=EF=BC=8C=E5=B8=96=E5=AD=90=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E6=B7=B7=E4=B9=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forums_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 253e1d28d..2b44d51de 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -86,7 +86,7 @@ class ForumsController < ApplicationController order(sort_clause). preload(:author, {:last_reply => :author}). all - + @memos 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) format.html { render action: :show, layout: 'base_forums' }#, error: "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" } @@ -122,14 +122,14 @@ class ForumsController < ApplicationController @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"). + # reorder("#{Memo.table_name}.sticky DESC"). includes(:last_reply). limit(@topic_pages.per_page). offset(@topic_pages.offset). order(sort_clause). preload(:author, {:last_reply => :author}). all - + @memos # @offset, @limit = api_offset_and_limit({:limit => 10}) # @forum = Forum.find(params[:id]) # @memos_all = @forum.topics From 8de307d198dbb9ec9f48dc136ffe603eb22bfe19 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 9 Jul 2015 14:36:59 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E5=8C=BA=E5=88=86=E2=80=9C=E9=A1=B9=E7=9B=AE=E5=86=85?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E2=80=9D=E5=92=8C=E2=80=9C=E5=85=A8=E7=AB=99?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_project_file_new.html.erb | 2 +- app/views/forums/_show_topics.html.erb | 56 ++++++++-------- app/views/forums/show.html.erb | 74 +++++++++------------- public/stylesheets/project.css | 2 +- 4 files changed, 61 insertions(+), 73 deletions(-) diff --git a/app/views/files/_project_file_new.html.erb b/app/views/files/_project_file_new.html.erb index 878e6a75e..4ee1ccede 100644 --- a/app/views/files/_project_file_new.html.erb +++ b/app/views/files/_project_file_new.html.erb @@ -41,7 +41,7 @@
    <%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search f_l",:remote=>true) do %> <%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%> - <%= submit_tag "站内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %> + <%= submit_tag "项目内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()", :style =>"width:72px;" %> <%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %> <% end %> <% manage_allowed = User.current.allowed_to?(:manage_files, @project) %> diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index f46600a6c..f8679cefa 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,31 +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%> - - - + <% 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) %><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %>
    回答回答
    <%= authoring topic.created_at, topic.author %> <% author = topic.last_reply.try(:author)%> @@ -35,14 +35,14 @@
    -
    - <% end %> - -<% else %> -

    <%= l(:label_no_data) %>

    -<% end %> + + + + + + <% end %> + + <% else %> +

    <%= l(:label_no_data) %>

    + <% end %>
    \ No newline at end of file diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index c105dc2b8..24aa74c23 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,54 +1,42 @@
    -

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

    + <%=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 %>
    -<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %> - <%= 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) + <%= 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? %> + :onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %> - <%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 28399462d..673b1f59c 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -159,7 +159,7 @@ a:hover.c_dblue{ color: #0781b4;} .re_top input{ float:left;} .re_search{ margin-top:7px; margin-left:5px;} .re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;} -.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; } +.re_schbtn{ width: 60px;height: 26px;color: #FFF;margin-right: 5px;margin-left: 0px;padding-left: 0px;border: medium none; } a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; } a:hover.re_fabu{background:#55a1b9;} .re_con{ margin:5px; width:665px;} From 4411136cb4995217c0f3389ed4c0f8d7acd30ca7 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 09:28:58 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8C=89=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=E5=80=92=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 23053a48e..0655c323b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -104,13 +104,20 @@ class UsersController < ApplicationController #added by young def user_projects - if User.current.admin? @memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}") else cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" @memberships = @user.memberships.all(:conditions => cond) end + @memberships = @memberships.sort {|a,b| b.created_on.to_i <=> a.created_on.to_i} + # unless @memberships.nil? + # @user_projects = [] + # @memberships.each do |membership| + # @user_projects << membership.project + # end + # @user_projects = @user_projects.sort {|a,b| b.created_on.to_i <=> a.created_on.to_i} + # end #events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20) #@events_by_day = events.group_by(&:event_date) @state = 0 @@ -256,9 +263,7 @@ class UsersController < ApplicationController membership.sort! {|older, newer| newer.created_on <=> older.created_on } @memberships = [] - membership.collect { |e| - @memberships.push(e) - } + membership.collect { |e| @memberships.push(e)} ## 判断课程是否过期 [需封装] @memberships_doing = [] @memberships_done = [] From 7b6e40f4c3ada96a5730652c56854ecc33130da6 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 09:31:57 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E4=B8=AD=E2=80=9C=E6=88=91=E7=9A=84=E9=A1=B9=E7=9B=AE=E2=80=9D?= =?UTF-8?q?=E5=92=8C=E2=80=9C=E6=88=91=E7=9A=84=E8=AF=BE=E7=A8=8B=E2=80=9D?= =?UTF-8?q?=E5=80=92=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_new_header.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index 481ebeca6..a756009f0 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -26,7 +26,7 @@
  • <%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>
      - <% user_course.each do |course| %> + <% user_course.reverse.each do |course| %>
    • <%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %>
    • @@ -40,7 +40,7 @@
    • <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
        - <% User.current.projects.each do |project| %> + <% User.current.projects.reverse.each do |project| %>
      • <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
      • From fc61edf1fa0c9116031cdf5f9f5b46d15cf6922f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 10:37:34 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E6=B7=BB=E5=8A=A0=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8D?= =?UTF-8?q?=20=E7=BC=96=E8=BE=91=E5=99=A8=E5=9B=BE=E7=89=87=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 21 +- app/views/boards/_project_show.html.erb | 432 ++++++++++++------------ public/images/public_icon.png | Bin 9628 -> 11711 bytes 3 files changed, 220 insertions(+), 233 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 47de679c8..bad7f5e6d 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -39,9 +39,9 @@ <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
        <% author = topic.author.to_s %> -
        - <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, - :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> +
        + <%= link_to "#{topic.author.show_name}(#{topic.author.login})", user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, + :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

          :

        @@ -51,14 +51,11 @@ margin-right: 10px;"><%= l(:button_edit) %> <% end %> - <%= link_to( - l(:button_delete), - {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :class => 'talk_edit fr', - :style => ' margin-right: 10px;' - ) if topic.destroyable_by?(User.current) %> + <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, + :method => :post, + :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)%> @@ -165,7 +162,7 @@
      • <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
        - <%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %> + <%= link_to_user_header message.author.show_name,false,:class => 'fl c_orange f14 ' %>
        <%= textAreailizable message,:content,:attachments => message.attachments %> diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index c3dd863d5..a5988e4b0 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -13,10 +13,10 @@
        <% if !User.current.logged? %> -
        - <%= l(:label_user_login_project_board) %> - <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> -
        +
        + <%= l(:label_user_login_project_board) %> + <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> +
        <% end %>
        @@ -30,60 +30,57 @@

        讨论区共有<%= @topic_count %>个帖子

        <% if @topics.any? %> - <% @topics.each do |topic| %> -
        - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> -
        - <% author = topic.author.to_s %> -
        - <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, - :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> -
        -

          :

        + <% @topics.each do |topic| %> +
        + <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> +
        + <% author = topic.author.to_s %> +
        + <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, + :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> +
        +

          :

        -

          <%= h(topic.subject) %>

        -
        - <% if topic.editable_by?(User.current) %> - <%= l(:button_edit) %> - <% end %> - <%= link_to( - l(:button_delete), - {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, - :method => :post, - :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 %> - -
        -
        -
        -
        - <%= topic.content.html_safe %> - + }); + +
        +
        +
        +
        + <%= topic.content.html_safe %> + +
        +
        + + <%= link_to_attachments_course topic, :author => false %> + <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %>
        -
        - - <%= link_to_attachments_course topic, :author => false %> - <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> -
        - <% if User.current.logged? %> - <%= l(:button_reply) %> - <% end %> -
        - -
        -
        - <% reply = Message.new(:subject => "RE: #{topic.subject}")%> - <% if !topic.locked? && authorize_for('messages', 'reply') %> - -
        - <% end %> +
        + <% end %> <% else %>

        <%= l(:label_no_data) %>

        <% end %> @@ -211,78 +201,78 @@
        \ No newline at end of file diff --git a/public/images/public_icon.png b/public/images/public_icon.png index b915af0867de83057661e23f518705012e74e230..4dffad183a3c8a25c495199ab4a60df7f55dc4da 100644 GIT binary patch delta 8731 zcmZX)bzGE9*fz`toze&hNP~ocbS#Kc3W_eBQUcNflDnWT3Mh@Fa1$aO0=x7o5>g6C zElZb_lq|8tcj0|M&-Z)Z_n-Y;J2ThJIddFyoUxl_&}JFWN)6$qAR{3m8ENnORLz$~ zg}Az*r>*($8EzvxEcxL`dSy;tNLsum@5j$CC?l*sXgX_i{j_Rf%;iVXStZcC=HTbh zR=T9|2>R{UVFKmnLR0deg{YmU+CMpj4W+|lr=9gSU{9aAN`nod$2Cxu`#!o13>^$r zzj=t|zlTTQcm4O3>ga!Np-sw5)a#5|nr09y8L37@&W&{W2_r9owo~-wH6J<|uecIw1}l+sbyd3}l*BN|a44NKT{+e^)1o zJ9V?O_7EO&qWD4eu-=xUQ+1Zb?us<)$LcXN6+(33YwJ4f2v*ZhY8&ePB%!to)Q<=# zyh42k)as5n&~Dw-(fmVpgqXx_sQbqF>r`hM?+186M~y1{ z*%dO?kz2usDYkbL4SNeEHF?VImwR2Vj(mA( z^5)vrprcxiiD@3m-BV7|w`y5|o*OWE$P82x-B_)0&kJ!NA0;T7Lx`F{5Djj%&X~-a zNp8*-AUCR%Yo)3tZNiYGCbym#vcK{ocGNa??@SYHl9=PUHi^j0h=}D}6TiNXR403_ z8!L_99jHUm72Qh0i`kq8`R})4iy}D76%9f4X4XMJZkM|=qUL(f^xbp6liGBIN+8C!9{2ubN?1v&d_E5;mt?|F{X5t;ufBL-^B$rte@P;&SHXU zb`J44+;c+?`k+91hS^_`z5`MPycFSVsJTKI|8*3IQnyL@C5T0gFGz672O?t*n>Q_z z&aKdYwHipcV#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=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E3=80=81=E7=95=99=E8=A8=80=E4=B8=AD?= =?UTF-8?q?=E5=A7=93=E5=90=8D=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 6 +++--- app/views/courses/_history.html.erb | 13 +++++-------- app/views/words/_journal_reply_items.html.erb | 18 ++++++++++++------ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index bad7f5e6d..b69250b83 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -40,7 +40,7 @@
        <% author = topic.author.to_s %>
        - <%= link_to "#{topic.author.show_name}(#{topic.author.login})", user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, + <%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

          :

        @@ -160,9 +160,9 @@ <% replies_all.each do |message| %> <% replies_all_i=replies_all_i+1 %>
      • - <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class => 'Msg_pic' %>
        - <%= link_to_user_header message.author.show_name,false,:class => 'fl c_orange f14 ' %> + <%= link_to_user_header User.current.member_of_course?(@board.course) ? (message.author.show_name + "(" +topic.author.login + ")") : message.author, false,:class => 'fl c_orange f14 ' %>
        <%= textAreailizable message,:content,:attachments => message.attachments %> diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index d8e034161..07e9c2b98 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -9,7 +9,7 @@
        - <%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%> + <%= link_to User.current.member_of_course?(@course) ? "#{journal.user.show_name}(#{journal.user.login})" : "#{journal.user.login}", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%> <%= format_time(journal.created_on) %> @@ -24,10 +24,9 @@ <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> - <%= link_to(l(:label_bid_respond_delete), - {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, - :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', - :class => "delete", :title => l(:button_delete)) %> + <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, + :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', + :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> <%#= link_to l(:label_bid_respond_quote),'', @@ -43,9 +42,7 @@
        <% end %>
        - - <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %> - + <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true , :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
        diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 5e9d6ef46..85712a007 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -13,14 +13,20 @@
      • <% id = 'project_respond_form_'+ reply.id.to_s %> - <%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %> - <%= l(:label_reply_to)%> - <% if show_name %> - <%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> + <% if User.current.member_of_course?(@course) %> + <%= link_to User.current.member_of_course?(@course)? "#{reply.user.show_name}(#{reply.user.login})" : "#{reply.user.login}" , user_path(reply.user) %> + <%= l(:label_reply_to)%> + <% if show_name %> + <%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> + <% else %> + <%#= 之所以改成这样是因为觉得没有真实姓名的用“匿名用户”替换不合理 %> + <%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %> + <% end %> <% else %> - <%= l(:label_anonymous) %> + <%= link_to "#{reply.user}", user_path(reply.user) %> + <%= l(:label_reply_to)%> + <%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %> <% end %> -

        <%= reply.notes.html_safe %>

        From 57f6f72c6410956bff6a4148aa21fbced4ed7cd9 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 13:09:09 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E4=B8=8B=E9=9D=A2=E5=A4=9A=E4=BD=99=E7=9A=84=E9=BB=91?= =?UTF-8?q?=E8=89=B2=E6=A1=86=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/themes/default/default.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/assets/kindeditor/themes/default/default.css b/public/assets/kindeditor/themes/default/default.css index c5a84c186..986263903 100644 --- a/public/assets/kindeditor/themes/default/default.css +++ b/public/assets/kindeditor/themes/default/default.css @@ -522,8 +522,7 @@ /* statusbar */ .ke-statusbar { position: relative; - background-color: #F0F0EE; - border-top: 1px solid #CCCCCC; + font-size: 0; line-height: 0; *height: 12px; From 87320bf77bbac99700ca9706f015c32b484bbc97 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 14:24:11 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E5=A4=9A=E5=B1=82=E5=B5=8C=E5=A5=97=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 7 ++++--- app/views/words/_journal_reply_items.html.erb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index b69250b83..f09f070fe 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -40,8 +40,9 @@
        <% author = topic.author.to_s %>
        - <%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, - :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> + <%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author), + :class =>"talkmain_name fl f14",:title=>author, + :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

          :

        @@ -162,7 +163,7 @@
      • <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class => 'Msg_pic' %>
        - <%= link_to_user_header User.current.member_of_course?(@board.course) ? (message.author.show_name + "(" +topic.author.login + ")") : message.author, false,:class => 'fl c_orange f14 ' %> + <%= link_to User.current.member_of_course?(@board.course) ? "#{message.author.show_name}(#{message.author.login})" : "#{message.author}", user_path(message.author),:class => 'fl c_orange f14 ' %>
        <%= textAreailizable message,:content,:attachments => message.attachments %> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 85712a007..dce0a75a7 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -11,7 +11,7 @@ <%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %> <% end %>
        -
        +
        <% id = 'project_respond_form_'+ reply.id.to_s %> <% if User.current.member_of_course?(@course) %> <%= link_to User.current.member_of_course?(@course)? "#{reply.user.show_name}(#{reply.user.login})" : "#{reply.user.login}" , user_path(reply.user) %> From 179f7841f1ca1faba1ea857255f03da374cb1a4f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 15:02:22 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E6=9C=89=E6=88=91=E7=9B=B8=E5=85=B3500?= =?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/controllers/activity_notifys_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/activity_notifys_controller.rb b/app/controllers/activity_notifys_controller.rb index ad9818fcc..06f3ff86d 100644 --- a/app/controllers/activity_notifys_controller.rb +++ b/app/controllers/activity_notifys_controller.rb @@ -22,6 +22,9 @@ class ActivityNotifysController < ApplicationController list = query.order('is_read,id desc').limit(limit).offset(@obj_pages.offset).all(); events=[]; for item in list + if item.activity.nil? + next + end event = item.activity; event.set_notify_id(item.id) event.set_notify_is_read(item.is_read) From fd705385842b720760f69d48b35a692857d3ee3a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 10 Jul 2015 15:21:02 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=80=81=E6=9D=BFbese?= =?UTF-8?q?=E4=B8=AD=E6=88=91=E7=9A=84=E9=A1=B9=E7=9B=AE=E3=80=81=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_courses_list.html.erb | 2 +- app/views/layouts/_user_project_list.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_user_courses_list.html.erb b/app/views/layouts/_user_courses_list.html.erb index ce9282ee7..a5cd6f273 100644 --- a/app/views/layouts/_user_courses_list.html.erb +++ b/app/views/layouts/_user_courses_list.html.erb @@ -4,7 +4,7 @@
          <% course_index = 0 %> - <% User.current.courses.each do |course| %> + <% User.current.courses.reverse.each do |course| %> <% if !course_endTime_timeout?(course) %> <%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %> <% course_index += 1 %> diff --git a/app/views/layouts/_user_project_list.html.erb b/app/views/layouts/_user_project_list.html.erb index e38f9c4bd..4df61b01b 100644 --- a/app/views/layouts/_user_project_list.html.erb +++ b/app/views/layouts/_user_project_list.html.erb @@ -2,7 +2,7 @@
        • <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %>
            - <% User.current.projects.each do |project| %> + <% User.current.projects.reverse.each do |project| %>
          • <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %>