photomix/app/views/albums/_form.html.erb

63 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

2011-04-25 07:54:40 +02:00
<%= content_for :javascript do %>
<%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=true" -%>
<%= javascript_include_tag "tag/tag" -%>
2009-06-03 21:30:09 +02:00
<% end %>
<div id="map_canvas"></div>
2009-07-06 15:41:19 +02:00
2012-07-30 21:08:48 +02:00
<fieldset>
<%= hidden_field_tag :all_tags, "'#{Tag.all.map { |tag| tag.title }.join('\',\'')}'" %>
<%= hidden_field_tag :collection_id, params[:collection_id] %>
<%= form.hidden_field :id %>
<%= form.hidden_field :latitude %>
<%= form.hidden_field :longitude %>
<div class="control-group">
<%= form.label :title, t('activerecord.models.album.attributes.title'), {:class => 'control-label'} %>
<div class="controls">
<%= form.text_field :title, {:class => 'input-xlarge'} %>
</div>
</div>
<div class="control-group">
<%= form.label :description, t('activerecord.models.album.attributes.description'), {:class => 'control-label'} %>
<div class="controls">
<%= form.text_area :description, {:class => 'input-xlarge', :rows => 5} %>
</div>
</div>
<div class="control-group">
<%= form.label :public, t('activerecord.models.album.attributes.visible'), {:class => 'control-label'} %>
<div class="controls">
<label class="checkbox">
<%= check_box 'collection', :public %> <%= t(:make_visible_for_all) %>
</label>
</div>
</div>
<div class="control-group">
<%= form.label :address, t('activerecord.models.album.attributes.address'), {:class => 'control-label'} %>
<div class="controls">
<%= form.text_area :address, {:class => 'input-xlarge', :rows => 5} %>
</div>
</div>
<div class="control-group">
<%= form.label :note, t('activerecord.models.album.attributes.note'), {:class => 'control-label'} %>
<div class="controls">
<%= form.text_area :note, {:class => 'input-xlarge', :rows => 5} %>
</div>
</div>
<div class="control-group">
<%= form.label :tags, t('activerecord.models.album.attributes.tags'), {:class => 'control-label'} %>
<div class="controls">
<%= form.text_field :tags, {:class => 'input-xlarge', :autocomplete => "off", :class => 'tag_list', :value => (@album.tags.map{|tag|tag.title}.join(" ") unless @album.tags.nil?) } %>
</div>
</div>
<br />
Contains: <%= @album.photos.count %> photos<br/>
</fieldset>