Browse Source

layout changes

main
Christoph Marzell 4 weeks ago
parent
commit
9d87af4ed4
  1. 29
      app/views/entries/index.html.erb
  2. 13
      app/views/layouts/application.html.erb
  3. 1
      config/routes.rb

29
app/views/entries/index.html.erb

@ -118,8 +118,10 @@
<th data-sort-index="1" class="sortable">Zeit</th> <th data-sort-index="1" class="sortable">Zeit</th>
<th data-sort-index="2" class="sortable">Typ</th> <th data-sort-index="2" class="sortable">Typ</th>
<th data-sort-index="3" class="sortable">Art</th> <th data-sort-index="3" class="sortable">Art</th>
<th data-sort-index="4" class="sortable">Kilometer</th>
<th data-sort-index="5" class="sortable"><div class="d-flex justify-content-between"><div>Pauschale</div><div>Kosten</div></div></th>
<th data-sort-index="4" class="sortable">Beschreibung</th>
<th data-sort-index="5" class="sortable">Kilometer</th>
<th data-sort-index="6" class="sortable">Pauschale</th>
<th data-sort-index="7" class="sortable">Kosten</th>
<th>Aktionen</th> <th>Aktionen</th>
</tr> </tr>
</thead> </thead>
@ -134,19 +136,26 @@
<td> <td>
<%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.beschreibung : entry.entry_art.capitalize %> <%= ["Fortbildung", "Semesterkosten"].include?(entry.entry_art) ? entry.beschreibung : entry.entry_art.capitalize %>
</td> </td>
<td>
<%= entry.beschreibung %>
</td>
<td><%= entry.distance_km.to_f %> km</td> <td><%= entry.distance_km.to_f %> km</td>
<td> <td>
<div class="d-flex justify-content-between">
<% if entry.kilometer_pauschale.present? %>
<div><%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %></div>
<% end %>
<%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %>
</td>
<% if entry.kosten.present? %>
<div><%= number_to_currency(entry.kosten, unit: "€", separator: ",", delimiter: ".") %></div>
<% end %>
</div>
<td>
<%= number_to_currency(entry.kilometer_pauschale, unit: "€", separator: ",", delimiter: ".") %>
</td> </td>
<td class="text-end"> <td class="text-end">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<%= link_to 'Bearbeiten', edit_entry_path(entry), class: 'btn btn-sm btn-outline-primary' %> <%= link_to 'Bearbeiten', edit_entry_path(entry), class: 'btn btn-sm btn-outline-primary' %>

13
app/views/layouts/application.html.erb

@ -48,6 +48,19 @@
</script> </script>
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %> <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
<style>
@media (min-width: 1400px) {
.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
max-width: 1820px !important;
}
}
</style>
</head> </head>
<body> <body>

1
config/routes.rb

@ -21,6 +21,7 @@ Rails.application.routes.draw do
get "/db_dump/dump", to: "db_dump#dump" get "/db_dump/dump", to: "db_dump#dump"
get "/db_dump", to: "db_dump#index" get "/db_dump", to: "db_dump#index"
get "/rechner", to: "calculations#new", as: :rechner
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.

Loading…
Cancel
Save