Skip to content

Commit

Permalink
Layouts (#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudlevy committed Apr 4, 2024
1 parent 0281330 commit 650c7cc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/models/communication/block/template/location.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class Communication::Block::Template::Location < Communication::Block::Template::Base

has_elements
has_layouts [
:grid,
:list
]

def dependencies
selected_locations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<%= block_component_edit block, :layout %>

<draggable :list="data.elements" handle=".dragHandle" class="mb-3 <%= if_appstack 'list-group' %>">
<div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>">
<div>
Expand Down
7 changes: 7 additions & 0 deletions config/locales/communication/contents/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,13 @@ en:
description: A selection of locations on a campus.
edit:
add: Add a location
layouts:
grid:
description: Locations are shown as a grid, left to right and top to bottom.
label: Grid
list:
description: Locations are shown as a list, with images on the left and summary on the right.
label: List
organizations:
description: A list of organizations with logo, name and website.
edit:
Expand Down
7 changes: 7 additions & 0 deletions config/locales/communication/contents/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,13 @@ fr:
description: Une sélection de sites dans des campus.
edit:
add: Ajouter un site
layouts:
grid:
description: Les sites sont présentées en grille, de gauche à droite puis de haut en bas.
label: Grille
list:
description: Les sites sont présentés en liste, avec une image à gauche et le résumé à droite.
label: Liste
organizations:
description: Une liste d'organisations, avec leur logo, leur site et leur nom.
edit:
Expand Down

0 comments on commit 650c7cc

Please sign in to comment.