html view almost done

This commit is contained in:
Wojciech Todryk 2011-08-27 22:00:06 +02:00
parent 549238d734
commit 19aef7a5ed
15 changed files with 68 additions and 37 deletions

View file

@ -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;

View file

@ -0,0 +1 @@
<%= yield %>

View file

@ -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>

View file

@ -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 %>

View file

@ -1,3 +0,0 @@
<iframe frameborder="0" src="<%= messages_body_path(@message.uid) %>">
</iframe>

View file

@ -0,0 +1,3 @@
<iframe frameborder="0" src="<%= messages_part_body_path(@message.uid,@render_as_html_idx) %>">
</iframe>

View file

@ -0,0 +1,2 @@
<%= raw @body -%>

View file

@ -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>