Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bloc campus : mise en page grille ou liste #1752

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading