_hub.html.erb 1.87 KB
<div class='hub'>

  <h1><%= _("HUB Settings:") %></h1>

	<%= required_fields_message %>

  <div>
    <%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %>
  </div>

  <div>
    <%= required labelled_form_field(_('Description'), text_area(:article, 'body', :style => 'width: 99%;')) %>
  </div>

  <%= fields_for 'article[image_builder]', @article.image do |i| %>
    <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %>
  <% end %>

  <br />

  <div>
    <h2><%= _('Twitter Settings:') %></h2>
  </div>

  <%= check_box(:article, :twitter_enabled) %>
  <span><%= _("Turn on TWITTER") %></span>

  <span><%= labelled_form_field(_('Twitter\'s Hashtags, comma separated (example: participa.br,participabr)'), text_field(:article, :twitter_hashtags)) %></span>

  <div>
    <%=  labelled_form_field(_('Twitter\'s consumer key'), text_field(:article, :twitter_consumer_key)) %>
  </div>

  <div>
    <%=  labelled_form_field(_('Twitter\'s consumer secret'), text_field(:article, :twitter_consumer_secret)) %>
  </div>

  <div>
    <%=  labelled_form_field(_('Twitter\'s access token'), text_field(:article, :twitter_access_token)) %>
  </div>

  <div>
    <%=  labelled_form_field(_('Twitter\'s access token secret'), text_field(:article, :twitter_access_token_secret)) %>
  </div>
  <br />
  <div>
    <h2><%= _('Facebook Settings:') %></h2>
  </div>

  <%= check_box(:article, :facebook_enabled) %>
  <span><%= _("Turn on FACEBOOK") %></span>

  <span><%= labelled_form_field(_('Facebook\'s hashtag (example: #participabr)'), text_field(:article, :facebook_hashtag)) %></span>

  <span><%= labelled_form_field(_('Facebook\'s access token'), text_field(:article, :facebook_access_token)) %></span>
    <br />
    <a href='https://smashballoon.com/custom-facebook-feed/access-token/' ><%= _('How to get a new access token?') %><a>
  <br />
</div>