edit.html.erb
2.27 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<%= error_messages_for 'article' %>
<div class='<%= (@article.display_media_panel? ? 'with_media_panel' : 'no_media_panel') %>'>
<%= labelled_form_for 'article', :html => { :multipart => true, :class => @type } do |f| %>
<%= hidden_field_tag("type", @type) if @type %>
<%= hidden_field_tag('parent_id', @parent_id) if @parent_id %>
<%= hidden_field_tag('back_to', @back_to) %>
<%= hidden_field_tag('success_back_to', @success_back_to) %>
<%= render :partial => partial_for_class(@article.class), :locals => { :f => f } %>
<% if environment.is_portal_community?(profile) %>
<div>
<%= check_box(:article, :highlighted) %>
<label for="article_highlighted"><%= _('Highlight this article')%></label>
</div>
<% end %>
<% button_bar do %>
<%= submit_button :save, _('Save') %>
<%= submit_button :save, _('Save and continue'), :name => "continue" %>
<% end %>
<div style='float: right'>
<%= modal_button :help, _('Why categorize?'), :action => 'why_categorize' %>
</div>
<%= select_categories(:article, _('Categorize your article')) %>
<br />
<%= f.text_field('tag_list', :size => 64) %>
<%= content_tag( 'small', _('Separate tags with commas') ) %>
<script>
jQuery('#article_tag_list').inputosaurus({
autoCompleteSource: <%= "'/myprofile/#{profile.identifier}/cms/search_tags'," %>
activateFinalResult : true
})
</script>
<div id='edit-article-options'>
<%= options_for_article(@article, @tokenized_children) %>
</div>
<% button_bar do %>
<%= submit_button :save, _('Save') %>
<% if @back_to %>
<%= button :cancel, _('Cancel'), @back_to %>
<% elsif @parent_id || @article.parent %>
<%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
<% else %>
<%= button :cancel, _('Cancel'), :action => 'index' %>
<% end %>
<% unless @article.new_record? %>
<%= button :delete, _('Delete'), {:controller => :cms, :action => :destroy, :id => @article},
:method => :post, :confirm => delete_article_message(@article) %>
<% end %>
<% end %>
<% end %>
</div>
<% if @article.display_media_panel? %>
<%= render :partial => 'text_editor_sidebar' %>
<% end %>
<br style='clear: both'/>
<%= javascript_include_tag "article.js" %>