Files
ch420/app/views/network/signature_collections/index.html.slim
T
2017-12-17 22:26:09 +01:00

48 lines
1.9 KiB
Plaintext

h1 = title t('.title')
css:
.form-inline > * {
margin: 5px;
}
form
.form-inline
input.form-control placeholder="#{t('.search')}" name="query" value="#{@query}"
input.form-control placeholder="#{t('.location')}" name="location" value="#{@location}"
select.form-control name="distance"
- [5, 10, 20, 50, 100, 150, 200].each do | d |
- if d == @distance.to_i
option value="#{d}" selected="selected" #{d} Km
- else
option value="#{d}" #{d} Km
input.btn.btn-primary type="submit" value="#{t('.search')}"
table.table
thead
tr
th = Network::SignatureCollection.human_attribute_name :location_name
th = Network::SignatureCollection.human_attribute_name :location_zip
th = Network::SignatureCollection.human_attribute_name :location_address
th = Network::SignatureCollection.human_attribute_name :event_date_start
th = Network::SignatureCollection.human_attribute_name :event_date_end
- if admin?
th
th
th
tbody.list
- @network_signature_collections.each do |network_signature_collection|
tr
td.location_name = network_signature_collection.location_name
td.location_zip = network_signature_collection.location_zip
td.location_address = network_signature_collection.location_address
td.event_date_start = l network_signature_collection.event_date_start, format: :short
td.event_date_end = l network_signature_collection.event_date_end, format: :short
- if admin?
td = link_to t('shared.show'), network_signature_collection
td = link_to t('shared.edit'), edit_network_signature_collection_path(network_signature_collection)
td = link_to t('shared.destroy'), network_signature_collection, data: { confirm: 'Are you sure?' }, method: :delete
br
= link_to t('.new'), new_network_signature_collection_path