Add a "richtext" class to anything which contains text rendered
by our rich text library, and move styles which were only being
applied to diary entries to apply to all rich text.
- margin-left: 20px;
- }
- ul li {
- list-style: disc;
- }
- ol li {
- list-style: decimal;
}
ul.secondary-actions { display: inline-block;}
}
}
ul.secondary-actions { display: inline-block;}
}
background-color: #9ed485;
}
}
background-color: #9ed485;
}
}
/* Rules for doing distinct colour of alternate table rows */
.table0,
/* Rules for doing distinct colour of alternate table rows */
.table0,
+/* Rules for rich text */
+
+.richtext {
+ ul,
+ ol {
+ margin-bottom: 20px;
+ margin-left: 20px;
+ }
+ ul li {
+ list-style: disc;
+ }
+
+ ol li {
+ list-style: decimal;
+ }
+}
+
/* Rules for rich text editors */
.richtext_container {
/* Rules for rich text editors */
.richtext_container {
content_tag(:div, :id => "#{id}_container", :class => "richtext_container") do
output_buffer << content_tag(:div, :id => "#{id}_content", :class => "richtext_content") do
output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:format => format)))
content_tag(:div, :id => "#{id}_container", :class => "richtext_container") do
output_buffer << content_tag(:div, :id => "#{id}_content", :class => "richtext_content") do
output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:format => format)))
- output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview")
+ output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview richtext")
end
output_buffer << content_tag(:div, :id => "#{id}_help", :class => "richtext_help") do
end
output_buffer << content_tag(:div, :id => "#{id}_help", :class => "richtext_help") do
-<div class='clearfix diary-comment'>
+<div class="clearfix diary-comment">
<%= user_thumbnail diary_comment.user %>
<%= user_thumbnail diary_comment.user %>
- <p class='deemphasize comment-heading' id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %></p>
- <%= diary_comment.body.to_html %>
+ <p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %></p>
+ <div class="richtext"><%= diary_comment.body.to_html %></div>
<%= if_administrator(:span) do %>
<%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %>
<% end %>
<%= if_administrator(:span) do %>
<%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %>
<% end %>
-</div>
\ No newline at end of file
<h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
</div>
<h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
</div>
- <div xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
+
+ <div class="richtext" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
<%= diary_entry.body.to_html %>
</div>
<%= diary_entry.body.to_html %>
</div>
<tr class="<%= cl %>">
<td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td>
<td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %></span></td>
<tr class="<%= cl %>">
<td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td>
<td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %></span></td>
- <td width="50%"><%= comment.body.to_html %></td>
+ <td width="50%" class="richtext"><%= comment.body.to_html %></td>
</tr>
<% end -%>
</table>
</tr>
<% end -%>
</table>
<ul class='secondary-actions clearfix'>
<li><%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %></li>
<li><%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></li>
<ul class='secondary-actions clearfix'>
<li><%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %></li>
<li><%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></li>
-</ul>
\ No newline at end of file
- <%= @message.body.to_html %></td>
+ <div class="richtext"><%= @message.body.to_html %></div>
<%= link_to t('message.read.back_to_inbox'), :controller => 'message', :action => 'inbox', :display_name => @user.display_name %>
<%= link_to t('message.read.back_to_inbox'), :controller => 'message', :action => 'inbox', :display_name => @user.display_name %>
- <%= @message.body.to_html %></td>
+ <div class="richtext"><%= @message.body.to_html %></div>
<%= link_to t('message.read.back_to_outbox'), :controller => 'message', :action => 'outbox', :display_name => @user.display_name %>
<%= link_to t('message.read.back_to_outbox'), :controller => 'message', :action => 'outbox', :display_name => @user.display_name %>
-<% end %>
\ No newline at end of file
<b><%= t 'redaction.show.user' %></b>
<%= link_to(@redaction.user.display_name, {:controller => 'user', :action => 'view', :display_name => @redaction.user.display_name}) %>
</p>
<b><%= t 'redaction.show.user' %></b>
<%= link_to(@redaction.user.display_name, {:controller => 'user', :action => 'view', :display_name => @redaction.user.display_name}) %>
</p>
<b><%= t 'redaction.show.description' %></b>
<%= @redaction.description.to_html %>
</p>
<b><%= t 'redaction.show.description' %></b>
<%= @redaction.description.to_html %>
</p>
- <%= user.description.to_html %>
+ <div class="richtext"><%= user.description.to_html %></div>
</td>
<td>
<%= check_box_tag "user_#{user.id}", "", false, :name => "user[#{user.id}]" %>
</td>
<td>
<%= check_box_tag "user_#{user.id}", "", false, :name => "user[#{user.id}]" %>
- <div class='user-description'><%= @this_user.description.to_html %></div>
+ <div class="user-description richtext"><%= @this_user.description.to_html %></div>
<p><b><%= t'user_block.show.status' %></b>: <%= block_status(@user_block) %></p>
<p><b><%= t'user_block.show.reason' %></b></p>
<p><b><%= t'user_block.show.status' %></b>: <%= block_status(@user_block) %></p>
<p><b><%= t'user_block.show.reason' %></b></p>
-<%= @user_block.reason.to_html %>
\ No newline at end of file
+<div class="richtext"><%= @user_block.reason.to_html %></div>