publish.rhtml
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<h1><%= _('Select the groups where you want to publish your article') %></h1>
<% if !@failed.blank? %>
<div class="errorExplanation" id="errorExplanation">
<p><%=_("There were errors with the following communities: ")%></p>
<% @failed.each do |error, communities|%>
<strong> <%= error %>: </strong>
<ul>
<% communities.each do |community| %>
<li> <%= community %> </li>
<% end %>
</ul>
<% end %>
</div>
<% end %>
<!-- Workaroud while the publish feature isn't ready for Events -->
<% unless @article.is_a?(Event) %>
<% form_tag do%>
<%= hidden_field_tag :back_to, @back_to %>
<% @groups.each do |group| %>
<%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %><br />
<%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>
<hr />
<% end %>
<% button_bar do %>
<%= submit_button 'spread', _('Publish') %>
<% end %>
<% end %>
<% else %>
<div class='atention'>
<%= _("This option is temporarily disabled.") %>
</div>
<% end %>