registered-sites/app/views/admin/registered_sites/edit_annc.erb

76 lines
3.1 KiB
Plaintext
Raw Normal View History

2020-04-01 03:44:59 +00:00
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "member_select" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/module-area" %>
<%= javascript_include_tag "registered_site_progress" %>
<% end %>
<style type="text/css">
.col-sm-10.controls{
margin-left:0px;
}
.input-append input{
width: 150px;
}
</style>
<form action="/admin/registered_sites/<%= @site_annc.id.to_s %>/update_annc" method="post">
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<!-- Input Area -->
<div class="input-area">
<div class="control-group big-group">
<label class="control-label muted"><%= t("site_annc.recieve_sites") %></label>
<div class="controls">
<%= render partial: 'admin/registered_sites/site_selection_box', locals: {field: 'recieve_sites[]', recieve_sites:(@site_annc.recieve_sites || [])} %>
</div>
</div>
<div class="controls">
<label><%= t('site_annc.visible') %></label>
<%= check_box_tag 'visible', 'true', @site_annc.visible %>
</div>
<div class="controls">
<label>Send to all site:</label>
<%= check_box_tag 'send_all', 'true', @site_annc.send_all %>
</div>
<!-- Language Tabs -->
<div class="nav-name"><strong><%= t(:language) %></strong></div>
<ul class="nav nav-pills language-nav">
<% I18n.available_locales.each_with_index do |locale, i| %>
<li class="<%= 'active' if i == 0 %>">
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
</li>
<% end %>
</ul>
<!-- Language -->
<div class="tab-content module-area">
<% I18n.available_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<!-- Title-->
<div class="control-group input-title">
<label class="control-label muted"><%= t('site_annc.title') %></label>
<div class="controls">
<%= text_area_tag "title[#{locale}]",(@site_annc.title[locale] rescue nil), class: "ckeditor_reduce input-block-level", placeholder: t(:title) %>
</div>
</div>
<div class="control-group input-title">
<label class="control-label muted"><%= t('site_annc.content') %></label>
<div class="controls">
<%= text_area_tag "content[#{locale}]",(@site_annc.content[locale] rescue nil), class: "ckeditor input-block-level", placeholder: t('site_annc.content') %>
</div>
</div>
</div>
<% end %>
<label class="control-label muted"><%= t('site_annc.see_more_link') %></label>
<div class="controls">
<%= url_field_tag "see_more_link",(@site_annc.see_more_link rescue nil),class: "input-block-level", placeholder: t('site_annc.see_more_link') %>
</div>
</div>
</div>
<!-- Form Actions -->
<div class="form-actions">
<%= submit_tag t('submit'), class: 'btn btn-primary' %>
<input type="hidden" name="referer_url" value="<%= get_referer_url %>">
<%= link_to t('cancel'), '/admin/registered_sites/announcement', :class=>"btn" %>
</div>
</form>