diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index bde061f31..c83d9133f 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -27,6 +27,11 @@ } } + function submitComment() + { + $("#add_comment_form").submit(); + } + function regexDescription() { var name = $("#news_description").val(); @@ -54,104 +59,71 @@ } -
- <%= watcher_link(@news, User.current) %> - <%= link_to(l(:button_edit), - edit_news_path(@news), - :class => 'icon icon-edit', - :accesskey => accesskey(:edit), - :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %> - <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %> -
- -

<%=h @news.title %>

<% if authorize_for('news', 'edit') %> <% end %> -
- -
- - <%= textilizable(@news, :description) %> - -
- <%= link_to_attachments @news %> -
- - <% if @news.commentable? %> -

+

+ <%= link_to image_tag(url_to_avatar(@news.author),:width => 42,:height => 42), user_path(@news.author), :class => "problem_pic fl" %> +
+

<%=h @news.title %>

+ <%#= watcher_link(@news, User.current) %> + <%= link_to(l(:button_edit), + edit_news_path(@news), + :class => 'talk_edit fr', + :accesskey => accesskey(:edit), + :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %> + <%= delete_link news_path(@news),:class => 'talk_edit fr' if User.current.allowed_to?(:manage_news, @project) %> +
+
<%= textAreailizable(@news, :description) %>
<%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
+ <%= link_to_attachments_course @news %> + +
+
+
+ +<% if @news.commentable? %> +
<%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>

- <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> + <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %>
- <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> - <%= wikitoolbar_for 'comment_comments' %> + <%= text_area 'comment', 'comments', :rows => 5, :style => "width:98%" %> +
-

- <%= submit_tag l(:button_add) %> -

+ <%= l(:label_comment_add) %> <% end %> <% end %> - - <% html_title @news.title -%> - - <% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> - <% end %> - - -
-
-

<%= l(:label_comment_plural) %>

- <% comments = @comments.reverse %> - <% comments.each do |comment| %> +
+<% comments = @comments.reverse %> +<% comments.each do |comment| %> <% next if comment.new_record? %> - - - - - -
- <%= image_tag(url_to_avatar(comment.author), :class => "avatar")%> - - - - - - - - - - - - -
- <%= link_to_user(comment.author) if comment.respond_to?(:author) %> - <%= l(:label_project_newadd) %> - <%= l(:label_comment_plural) %> -
- - <%= textilizable(comment.comments) %> - -
- <%= format_time(comment.created_on) %> - - <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, - :data => {:confirm => l(:text_are_you_sure)}, - :method => :delete, - :title => l(:button_delete) %> -
+
+
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "ping_dispic" %>
+
+
+ <%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %><%= format_time(comment.created_on) %> +
+

<%= textAreailizable(comment.comments) %>

+
+
<%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, + :data => {:confirm => l(:text_are_you_sure)}, + :method => :delete, + :title => l(:button_delete) %> +
+
+
+
<% end if @comments.any? %>
+<% content_for :header_tags do %> + <%= stylesheet_link_tag 'scm' %> +<% end %> +<% html_title @news.title -%> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index b07f1ac9f..5c88c6be3 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -337,4 +337,8 @@ a:hover.st_add{ color:#ff8e15;} padding-left: 20px; padding-top: 2px; padding-bottom: 3px; -} \ No newline at end of file +} +/*新闻*/ +.msg_box{ width:670px; height:173px; border-bottom:1px dashed #CCC; padding-top:10px;} +.msg_box h4{ } +.msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } \ No newline at end of file