diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb index b8b0f5ff7..93c2e089f 100644 --- a/app/views/forums/_file_form.html.erb +++ b/app/views/forums/_file_form.html.erb @@ -7,7 +7,9 @@ <% 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) %>: + + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly',:style=>'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;font-family: Consolas;') %><%= 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? #待补充代码 @@ -16,7 +18,7 @@ end %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - + <%= link_to(''.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
@@ -48,13 +50,6 @@ <%#= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'AnnexBtn fl mt3' %> <%#= button_tag "上传附件", :id => "upload_attachments", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %> - - - - - 上传附件 - - <%= file_field_tag 'attachments[dummy][file]', :id => '_file', @@ -81,7 +76,11 @@ <%#= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %> - + + + + 上传附件 + <% content_for :header_tags do %> <%= javascript_include_tag 'attachments' %> <% end %> diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index d583728d1..eee792a77 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -1,23 +1,23 @@

- <%= @user.show_name %> > 讨论 + <%= @user.show_name %> > 论坛

-
    -
  • <%= @memos_praise_count %>
    被赞
  • -
  • <%= @my_memos_count %>
    回复/评论
  • -
  • <%= @my_forums_count %>
    主题
  • +
      +
    • <%= @memos_praise_count %>
      被赞
    • +
    • <%= @my_memos_count %>
      回复/评论
    • +
    • <%= @my_forums_count %>
      主题
@@ -29,27 +29,32 @@
<% @memos.each_with_index do |memo, index| %>
- + <%= image_tag(url_to_avatar(memo.author), :width => 50, :height => 50,:alt=>'用户头像', :class=>"bor-radius-all mt3" ) %>
- <%= User.find(memo.author_id).try(:show_name) %> -

- +

+ <%= memo.subject %> - <% if memo.sticky %> - - <% end %> + <% if memo.sticky %> + + <% end %>

-

<%= memo.content %>

-

- <%= memo.viewed_count %> - <%= get_praise_num(memo) %> - <%= Memo.where(:root_id => memo.id).count %> - - 最后更新:<%= time_from_now memo.updated_at %> -

+

<%= memo.content %>

+
+ <%= User.find(memo.author_id).try(:show_name) %> + <%= time_from_now memo.updated_at %> + +

+ <%= memo.viewed_count %> + <%= get_praise_num(memo) %> + <%= Memo.where(:root_id => memo.id).count %> + + +

+
+ <% if @user.admin? || @user == memo.author %>
@@ -70,13 +75,13 @@
<% end %>
-
-
-
    - <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
-
-
+
+
+
+
    + <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
+
diff --git a/app/views/memos/_attachments_links.html.erb b/app/views/memos/_attachments_links.html.erb index ca0f41d16..dc983f8a8 100644 --- a/app/views/memos/_attachments_links.html.erb +++ b/app/views/memos/_attachments_links.html.erb @@ -1,4 +1,4 @@ -
+
<% for attachment in attachments %> @@ -20,8 +20,11 @@
<% else %> - <%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 45 -%> - (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + + <%= link_to_short_attachment attachment, :class => 'fl FilesName02 color-orange03', :download => true, :length => 45 -%> + (<%= number_to_human_size attachment.filesize , :precision => 0 %>) + <%= attachment.author %> + ,<%= format_time attachment.created_on %> <% if options[:deletable] %> <% end %> diff --git a/app/views/memos/_common_reply_box.html.erb b/app/views/memos/_common_reply_box.html.erb index def25d106..cec0cdcfc 100644 --- a/app/views/memos/_common_reply_box.html.erb +++ b/app/views/memos/_common_reply_box.html.erb @@ -61,37 +61,37 @@
<%= comment.content_detail.html_safe %>
+
+
+ <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> + <%= time_from_now(comment.created_at) %> +
+

+ <% if comment.creator_user == User.current %> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => memo.class.to_s, :user_activity_id => memo.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey") %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + +

+
+
- -
-
- <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> - <%= time_from_now(comment.created_at) %> -
-

- <% if comment.creator_user == User.current %> - 删除 - <% end %> - | - <%= link_to( - '回复'.html_safe, - {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => memo.class.to_s, :user_activity_id => memo.id}, - :remote => true, - :method => 'get', - :title => l(:button_reply),:class => "color-grey") %> - | - - <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - -

-
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index afa9a1eff..aaaa56627 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -5,7 +5,7 @@

- <%= @user.show_name %> > 讨论 + <%= @user.show_name %> > 讨论

@@ -16,11 +16,11 @@

- + <%= image_tag(url_to_avatar(@memo.author), :width => 60, :height => 60, :alt=>'用户头像', :class=>"panel-list-img mr15" ) %> -
-
+
+

<%= h @memo.subject %> <% if @memo.sticky %> @@ -29,7 +29,7 @@

-

<%= @memo.author.show_name %>发表于<%= time_from_now @memo.updated_at %>

+

<%= @memo.author.show_name %>发表于<%= time_from_now @memo.updated_at %>

@@ -55,7 +55,7 @@ <%= @memo.content.html_safe %>
-
    +
      <% if @memo.attachments.any?%> <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> diff --git a/app/views/messages/_common_reply_box.html.erb b/app/views/messages/_common_reply_box.html.erb index c2313c569..3c5142aee 100644 --- a/app/views/messages/_common_reply_box.html.erb +++ b/app/views/messages/_common_reply_box.html.erb @@ -73,6 +73,28 @@
      <%= comment.content_detail.html_safe %>
      +
      +
      + <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> + <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> +
      +

      + <% if is_teacher || comment.creator_user == User.current%> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey") %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + +

      +
      @@ -81,29 +103,6 @@
      - -
      -
      - <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> - <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> -
      -

      - <% if is_teacher || comment.creator_user == User.current%> - 删除 - <% end %> - | - <%= link_to( - '回复'.html_safe, - {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id}, - :remote => true, - :method => 'get', - :title => l(:button_reply),:class => "color-grey") %> - | - - <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - -

      -