Skip to content

Commit

Permalink
External ID Editable in Rideshare
Browse files Browse the repository at this point in the history
# Capitalized, short 50-character subject line without umlaut.

# 72-character wrapped longer description.

# JIRA-TASK
  • Loading branch information
marcometz committed Apr 20, 2022
1 parent b063c2f commit 257854a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/controllers/point_of_interest_rideshares_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def index
query {
pointsOfInterest(descendants: "Mitfahrpunkte" ) {
id
externalId
name
visible
dataProvider{
Expand Down Expand Up @@ -56,6 +57,7 @@ def edit
name
}
id
externalId
name
description
mediaContents {
Expand Down
9 changes: 9 additions & 0 deletions app/views/point_of_interest_rideshares/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
</div>
</div>

<div class="row">
<div class="col">
<div class="form-group">
<label for="external_id">External ID (bsp.: bbnavi:12073:0001)</label>
<%= f.text_field :external_id, required: true, class: "form-control" %>
</div>
</div>
</div>

<div class="row">
<div class="col">
<div class="form-group">
Expand Down
4 changes: 3 additions & 1 deletion app/views/point_of_interest_rideshares/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">ExternalId</th>
<th scope="col">Überschrift</th>
<th scope="col">Änderungsdatum</th>
<th scope="col">Erstellungsdatum</th>
Expand All @@ -25,6 +26,7 @@
<% @points_of_interest.each do |poi| %>
<tr>
<th scope="row"><%= poi.id %></th>
<th scope="row"><%= poi.external_id %></th>
<td><%= link_to poi.name, edit_point_of_interest_path(poi.id) %></td>
<td><%= toLocalDateTime(poi.updated_at) %></td>
<td><%= toLocalDateTime(poi.created_at) %></td>
Expand All @@ -33,7 +35,7 @@
<td align="center"><%= visibility_switch(poi, "PointOfInterest") %></td>
<% end %>
<td align="right" class="text-nowrap">
<%= link_to "Bearbeiten", edit_point_of_interest_path(poi.id), class: "btn btn-sm btn-secondary" %>
<%= link_to "Bearbeiten", edit_point_of_interest_rideshare_path(poi.id), class: "btn btn-sm btn-secondary" %>
<%= link_to point_of_interest_rideshare_path(poi.id), method: :delete, "data-confirm" => "Diesen Eintrag wirklich löschen?", class: "btn btn-sm btn-danger", title: "Löschen" do %>
<i class="fas fa-trash"></i>
<% end %>
Expand Down

0 comments on commit 257854a

Please sign in to comment.