hub.html.erb
2.67 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<% extend CommunityHubPlugin::HubHelper %>
<div id="<%=@page.id%>" class="hub">
<div class="title"><%= @page.title %> HUB</div>
<div class="description"><%= @page.body %></div>
<br />
<div id="left-tab" class="live content-tab show">
<h1 class="live">
<span class="on-air"><%= _("Live") %></span>
</h1>
<h1 class="mediation">
<span class="title"><%= _("Mediation") %></span>
</h1>
<div class="envelope">
<ul id="live-posts"></ul>
</div>
<span><%= check_box_tag 'auto_scrolling', 'yes', true %><%= _("Auto scrolling") %></span>
<% if logged_in? %>
<div id="input-panel">
<div class="form-message">
<%= form_for :message,
:method => 'post',
:url => {
:controller => 'community_hub_plugin_public',
:action => 'new_message',
:article_id => @page.id
} do |f| %>
<span><%= _("Streaming") %></span>
<br />
<%= f.text_area :body, :style => "width: 99%;", :cols => "38", :rows => "5", :placeholder => _("Type your message here") %>
<%= submit_button('add', _('Post'), :onclick => 'new_message(this); return false;') %>
<% end %>
</div>
</div>
<% end %>
</div>
<div id="right-tab" class="mediation content-tab hide">
<h1 class="live">
<span class="on-air"><%= _("Live") %></span>
</h1>
<h1 class="mediation">
<span class="title"><%= _("Mediation") %></span>
</h1>
<div class="envelope">
<ul id="mediation-posts"></ul>
</div>
<% if logged_in? && mediator?(@page) %>
<div class="form-mediation">
<%= render :file => 'shared/tiny_mce' %>
<%= form_for :article,
:method => 'post',
:url => {
:controller => 'community_hub_plugin_public',
:action => 'new_mediation',
:profile_id => profile.id
} do |f| %>
<%= f.hidden_field :parent_id, :value => @page.id %>
<%= f.text_area :body, :style => "width: 100%;", :class => "mceEditor" %>
<%= submit_button('add', _('Post'), :onclick => 'new_mediation(this); return false;') %>
<% end %>
</div>
<%= render :partial => "community_hub_plugin_public/settings" %>
<% end %>
</div>
</div>
<script type="text/javascript">
DEFAULT_PIN_QUESTION = '<%= _("Are you sure that you want to pin this message?") %>';
DEFAULT_PROMOTE_QUESTION = '<%= _("Are you sure that you want to promote this user?") %>';
</script>
<%= javascript_include_tag '/plugins/community_hub/javascripts/community_hub.js' %>