html view almost done
This commit is contained in:
parent
549238d734
commit
19aef7a5ed
15 changed files with 68 additions and 37 deletions
|
@ -444,7 +444,7 @@ div.msg_header {
|
|||
|
||||
iframe {
|
||||
width: 937px;
|
||||
height: 600px;
|
||||
height: 800px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
@ -495,6 +495,7 @@ div.render_text span{
|
|||
}
|
||||
|
||||
div.render_text pre {
|
||||
font-size: 12px;
|
||||
background-color: #EFF3E4;
|
||||
padding: 5px;
|
||||
border: 1px solid #5E634E;
|
||||
|
|
1
themes/olive/views/layouts/html_view.erb
Executable file
1
themes/olive/views/layouts/html_view.erb
Executable file
|
@ -0,0 +1 @@
|
|||
<%= yield %>
|
|
@ -13,3 +13,6 @@
|
|||
<td>
|
||||
<%= link_to t(:download), messages_attachment_download_path(attachment.message_id,attachment.idx) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t(:view), messages_part_body_path(attachment.message_id,attachment.idx) %>
|
||||
</td>
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
<table class="table">
|
||||
|
||||
<% trclass = :even %>
|
||||
<% @attachments.each do |a| %>
|
||||
<% for idx in 0..@attachments.size-1 %>
|
||||
<% @attachments[idx].idx = idx %>
|
||||
<tr class="<%= trclass.to_s %>">
|
||||
<%= render :partial => 'attachment', :object => a %>
|
||||
<%= render :partial => 'attachment', :object => @attachments[idx] %>
|
||||
</tr>
|
||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<iframe frameborder="0" src="<%= messages_body_path(@message.uid) %>">
|
||||
</iframe>
|
||||
|
3
themes/olive/views/messages/_html_part.html.erb
Executable file
3
themes/olive/views/messages/_html_part.html.erb
Executable file
|
@ -0,0 +1,3 @@
|
|||
<iframe frameborder="0" src="<%= messages_part_body_path(@message.uid,@render_as_html_idx) %>">
|
||||
</iframe>
|
||||
|
2
themes/olive/views/messages/html_view.html.erb
Executable file
2
themes/olive/views/messages/html_view.html.erb
Executable file
|
@ -0,0 +1,2 @@
|
|||
<%= raw @body -%>
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
<%= render :partial => 'attachments' %>
|
||||
<% end %>
|
||||
|
||||
<% if not @render_rich.nil? %>
|
||||
<%= render :partial => 'body' ,:object => @render_body %>
|
||||
<% if not @render_as_html_idx.nil? %>
|
||||
<%= render :partial => 'html_part' %>
|
||||
<% else %>
|
||||
<div class="render_text">
|
||||
<span><%= t(:content,:scope=>:message) %></span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue