hub.rhtml
2.26 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
<% extend CommunityHubPlugin::HubHelper %>
<div id="<%=@page.id%>" class="hub">
<div class="title"><%= @page.title %> HUB</div>
<div class="description"><%= @page.body %></div>
<br />
<div class="live">
<h1>
<span class="title"><%= @page.title %></span><span class="on-air"><%= _("Live") %></span>
</h1>
<ul id="live-posts">
</ul>
<span><%= check_box_tag 'auto_scrolling', 'yes', true %><%= _("Auto scrolling") %></span>
</div>
<div class="mediation">
<h1>
<span class="title"><%= _("Mediation") %><span class="expand">▼</span></span>
</h1>
<ul id="mediation-posts">
</ul>
</div>
<% if logged_in? %>
<div class="form">
<% if !mediator?(@page) %>
<% 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 => "10", :placeholder => _("Type your message here") %>
<%= submit_button('add', _('Post'), :onclick => 'new_message(this); return false;') %>
<% end %>
<% else %>
<%= 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 %>
<% end %>
</div>
<% end %>
<% if mediator?(@page) %>
<%= render :partial => "community_hub_plugin_public/settings" %>
<% else %>
<%= render :partial => "community_hub_plugin_public/banner" %>
<%= render :partial => "community_hub_plugin_public/embed" %>
<% end %>
</div>
<%= javascript_include_tag '/plugins/community_hub/javascripts/community_hub.js' %>