2015-09-22 05:56:02 +00:00
|
|
|
<% content_for :page_specific_css do %>
|
|
|
|
<%= stylesheet_link_tag "lib/main-forms" %>
|
|
|
|
<%= stylesheet_link_tag "lib/fileupload" %>
|
|
|
|
<%= stylesheet_link_tag "lib/main-list" %>
|
|
|
|
<% end %>
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
|
|
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<!-- Input Area -->
|
|
|
|
<div class="input-area">
|
|
|
|
<!-- Module -->
|
|
|
|
<div class="tab-content">
|
|
|
|
|
|
|
|
<!-- Basic Module -->
|
|
|
|
<div class="tab-pane fade in active" id="basic">
|
|
|
|
|
|
|
|
<% @site_in_use_locales.each do |locale| %>
|
|
|
|
<%= f.fields_for :title_translations do |f| %>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :title.to_s + " (" + locale.to_s + ")", :class => "control-label muted" %>
|
|
|
|
<div class="controls">
|
2015-10-13 10:55:18 +00:00
|
|
|
<%= f.text_field locale, placeholder: t("space.building_name"), :value => @building.title_translations[locale.to_s] %>
|
2015-09-22 05:56:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-10-13 10:55:18 +00:00
|
|
|
|
|
|
|
<!-- Category -->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted"><%= t(:category) %></label>
|
|
|
|
<div class="controls">
|
|
|
|
<%= select_category(f, ModuleApp.find_by_key("space")) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-09-22 05:56:02 +00:00
|
|
|
<!-- Images Upload -->
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted"><%= t(:image) %></label>
|
|
|
|
<div class="controls">
|
|
|
|
<div class="fileupload fileupload-new clearfix <%= 'fileupload-edit' if @building.image.file %>" data-provides="fileupload">
|
|
|
|
<div class="fileupload-new thumbnail pull-left">
|
|
|
|
<% if @building.image.file %>
|
|
|
|
<%= image_tag @building.image %>
|
|
|
|
<% else %>
|
|
|
|
<img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" />
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
|
|
|
<span class="btn btn-file">
|
|
|
|
<span class="fileupload-new"><%= t(:select_image) %></span>
|
|
|
|
<span class="fileupload-exists"><%= t(:change) %></span>
|
|
|
|
<%= f.file_field :image %>
|
|
|
|
</span>
|
|
|
|
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
|
|
|
<div class="controls" data-toggle="buttons-checkbox">
|
|
|
|
<label class="checkbox inline btn btn-danger fileupload-remove">
|
|
|
|
<%= f.check_box :remove_image %><%= t(:remove) %>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Form Actions -->
|
|
|
|
<div class="form-actions">
|
|
|
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
|
|
|
<%= link_to t('cancel'), admin_spaces_path, :class=>"btn" %>
|
|
|
|
</div>
|