From 5180c959a84e409cad84d79e20c60f299dadeda5 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 10 Oct 2014 14:09:43 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=20=E9=A1=B9=E7=9B=AE--?=
=?UTF-8?q?=E6=96=B0=E9=97=BB=E3=80=81=E8=AF=BE=E7=A8=8B--=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E9=80=9A=E7=9F=A5=20=E5=88=97=E8=A1=A8=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98=202.=E4=BC=98=E5=8C=96=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/news/_course_news.html.erb | 39 ++++++++++++++++++++-------
app/views/news/_project_news.html.erb | 16 ++++++++---
public/stylesheets/application.css | 5 ++--
3 files changed, 45 insertions(+), 15 deletions(-)
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb
index f8bd9c638..ea94244d5 100644
--- a/app/views/news/_course_news.html.erb
+++ b/app/views/news/_course_news.html.erb
@@ -74,7 +74,6 @@
<%= labelled_form_for @news, :url => course_news_index_path(@course),
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
- <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %>
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>|
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
@@ -90,26 +89,48 @@
<% else %>
<% @newss.each do |news| %>
-
- <%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %> |
+
+ <%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %>
+ |
- <%= link_to_user(news.author) if news.respond_to?(:author) %><%= l(:label_project_notice) %><%= link_to h(news.title), news_path(news) %>
- <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @couese) %>
+
+ <%= link_to_user(news.author) if news.respond_to?(:author) %>
+
+
+ <%= l(:label_project_notice) %>
+
+
+ <%= link_to h(news.title), news_path(news) %>
+
+
+ <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @couese) %>
+
|
- <%= textilizable(news, :description) %> |
+
+ <%= textilizable(news, :description) %>
+
+
- <%= l :label_update_time %>
- : <%= format_time(news.created_on) %> |
- <%= link_to l(:label_project_newother), news_path(news) %><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %> |
+
+
+ <%= l :label_update_time %>
+ :
+ <%= format_time(news.created_on) %>
+
+ |
+
+ <%= link_to l(:label_project_newother), news_path(news) %>
+ <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %>
+ |
|
diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb
index 35f76dfaa..75f33d1d3 100644
--- a/app/views/news/_project_news.html.erb
+++ b/app/views/news/_project_news.html.erb
@@ -101,21 +101,29 @@
- <%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %> |
+
+ <%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %>
+ |
<% if @project.project_type == 1 %>
- <%= link_to_user(news.author) if news.respond_to?(:author) %><%= l(:label_project_notice) %><%= link_to h(news.title), news_path(news) %>
+ <%= link_to_user(news.author) if news.respond_to?(:author) %>
+ <%= l(:label_project_notice) %>
+ <%= link_to h(news.title), news_path(news) %>
<%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %>
|
<% else %>
- <%= link_to_user(news.author) if news.respond_to?(:author) %><%= l(:label_project_newshare) %> <%= link_to h(news.title), news_path(news) %>
- <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %>
+ <%= link_to_user(news.author) if news.respond_to?(:author) %>
+ <%= l(:label_project_newshare) %>
+ <%= link_to h(news.title), news_path(news) %>
+
+ <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %>
+
|
<% end %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 38af97023..6c78af85a 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -749,8 +749,9 @@ ul.user_course_sort li{list-style-type:none;
}
.font_description{
font-size:14px;
- line-height: 1.5em;
-
+ line-height: 1.5em;
+ word-break:break-all;
+ word-wrap: break-word;
}
.font_description2{
font-size:13px;
|