Commit 3583e31a0aa42544981786413092ac30d6fc1c10
1 parent
bb58ba05
Exists in
master
and in
29 other branches
Move article image out of the lead
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
app/views/shared/_lead_and_body.rhtml
@@ -7,18 +7,18 @@ | @@ -7,18 +7,18 @@ | ||
7 | <% lead_id ||= 0%> | 7 | <% lead_id ||= 0%> |
8 | <% f ||= false%> | 8 | <% f ||= false%> |
9 | 9 | ||
10 | +<% if @article %> | ||
11 | + <% fields_for 'article[image_builder]', @article.image do |i| %> | ||
12 | + <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %> | ||
13 | + <% end %> | ||
14 | +<% end %> | ||
15 | + | ||
10 | <br style="clear: both;"/> | 16 | <br style="clear: both;"/> |
11 | <%= button :add, _("Lead"), '#', :class => "lead-button", :article_id => "#article-lead-"+lead_id.to_s, :style => "margin-left: 0px;" %> | 17 | <%= button :add, _("Lead"), '#', :class => "lead-button", :article_id => "#article-lead-"+lead_id.to_s, :style => "margin-left: 0px;" %> |
12 | <em><%= _('Used when a short version of your text is needed.') %></em> | 18 | <em><%= _('Used when a short version of your text is needed.') %></em> |
13 | 19 | ||
14 | <div class='article-lead' id="article-lead-<%=lead_id.to_s%>"> | 20 | <div class='article-lead' id="article-lead-<%=lead_id.to_s%>"> |
15 | 21 | ||
16 | - <% if @article %> | ||
17 | - <% fields_for 'article[image_builder]', @article.image do |i| %> | ||
18 | - <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %> | ||
19 | - <% end %> | ||
20 | - <% end %> | ||
21 | - | ||
22 | <% if f %> | 22 | <% if f %> |
23 | <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %> | 23 | <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %> |
24 | <% else %> | 24 | <% else %> |