Skip to content

Commit

Permalink
include position in edit form for admins and event managers
Browse files Browse the repository at this point in the history
  • Loading branch information
thoherr committed Oct 21, 2024
1 parent cbd2533 commit ffdbdf9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/exhibits_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def exhibit_params
:size_studs, :size, :value, :building_hours, :brick_count,
:needs_power_supply, :needs_transportation, :is_installation,
:is_part_of_installation, :installation_exhibit_id, :is_collab,
:platform, :position,
:remarks, :size_x, :size_y, :size_z, :unit_id,
:size_x_meter, :size_y_meter, :size_z_meter,
:former_exhibit_id,
Expand Down
7 changes: 6 additions & 1 deletion app/views/exhibits/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@
<%= f.select :installation_exhibit_id, @exhibit.event_installations.collect { |i| [i.name, i.id] }, {:prompt => t('please_choose')} %>
</div>

<div class="field">
<% if user_is_admin? || (@exhibit.attendance && @exhibit.attendance.event && @exhibit.attendance.event.is_managed_by?(current_user)) -%>
<%= f.label :value, t('label_table_position') %><br/>
<%= f.number_field :platform %> . <%= f.number_field :position %>
<% end %>

<div class="field">
<%= f.label :remarks, t('label_further_remarks') %><br/>
<%= f.text_area :remarks, cols: 80, rows: 10 %>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/locales/application.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ de:
label_moc_is_collab: "Dieses MOC ist eine COLLAB (enthält keine Einzel-MOCs)"
moc_data_imported_stats_notice: "MOC-Daten importiert (%{import} übersprungen, %{import2} fehlerhaft, %{import3} importiert)"
failed_moc_ids: "Fehlerhafte MOC-IDs: %{inspect}"
label_table_position: "Tischposition:"
1 change: 1 addition & 0 deletions config/locales/application.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ en:
label_moc_is_collab: "This is a COLLAB joint project (no single MOCs included)"
moc_data_imported_stats_notice: "MOC data imported (%{import} skipped, %{import2} failed, %{import3} imported)"
failed_moc_ids: "Failed MOC-IDs: %{inspect}"
label_table_position: "Position:"

0 comments on commit ffdbdf9

Please sign in to comment.