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) 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 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 = [] 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/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] ] diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 3e1530e3f..f09f070fe 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -32,33 +32,31 @@
<% 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, - :style=>'max-width:60px;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;' %>

  :

-

  <%= h(topic.subject) %>

+

  <%= h(topic.subject) %>

<% if topic.course_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) %> + <%= 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)%> @@ -101,7 +99,7 @@ // } }); -
+
<%= topic.content.html_safe %> @@ -122,7 +120,7 @@ <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %>
- <%= l(:button_reply) %> + <%= l(:button_reply) %>
@@ -163,17 +161,17 @@ <% 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,false,:class => 'fl c_orange ' %> + <%= 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 %>

    - <%= format_time(message.created_on) %> + <%= format_time(message.created_on) %> <%= link_to( l(:button_delete), @@ -181,13 +179,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..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 %>
    @@ -28,62 +28,59 @@
    -

    讨论区共有<%= @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, - :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 %> - -
    -
    - - <%= 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 %> -
    - <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}). - reorder("#{Message.table_name}.id desc").all %> - <% unless replies_all.empty? %> -
    -
      - <% replies_all_i = 0 %> - <% 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_user_header message.author,false,:class => 'fl c_orange ' %> -
      -
      - <%= textAreailizable message,:content,:attachments => message.attachments %> - -
      - -
      - <%= format_time(message.created_on) %> - <%= link_to( - - l(:button_delete), - {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete), - :class => ' c_dblue fr' - ) if message.course_destroyable_by?(User.current) %> - <%= link_to( - l(:button_reply), - 'javascript:;', - :nhname =>'showbtn_child_reply', - :class => ' c_dblue fr', - :style => 'margin-right: 10px;', - :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %> + <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).reorder("#{Message.table_name}.id desc").all %> + <% unless replies_all.empty? %> +
      +
        + <% replies_all_i = 0 %> + <% 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_user_header message.author,false,:class => 'fl c_orange f14 ' %> +
        +
        + <%= textAreailizable message,:content,:attachments => message.attachments %> + +
        + +
        + <%= format_time(message.created_on) %> + <%= link_to(l(:button_delete),{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete), + :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 f14', + :style => 'margin-right: 10px;', + :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %> +
        +
        +
      • + <% end %> +
      -
      -
    • + <%if topic.replies_count>2 %> + + <% end %> <% end %> -
    -
    - <%if topic.replies_count>2 %> - - <% end %> - <% end %> -
    -
    - <% end %> +
    + <% end %> <% else %>

    <%= l(:label_no_data) %>

    <% end %> @@ -211,78 +201,78 @@
    \ No newline at end of file diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index 043bac947..07e9c2b98 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 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) %>
    @@ -20,14 +20,13 @@

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

    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] %>


    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" %>
      • 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 } %>
          • 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 %> diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 692cca85d..7b5c354c2 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -11,16 +11,22 @@ <%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %> <% end %>
            -
            +
            <% 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 %>

            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; diff --git a/public/images/public_icon.png b/public/images/public_icon.png index b915af086..4dffad183 100644 Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ 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;}