Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
2336b6e4
Commit
2336b6e4
authored
2 years ago
by
Arnaud Levy
Browse files
Options
Downloads
Patches
Plain Diff
better gallery
parent
375b674a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/views/admin/communication/blocks/templates/gallery/_edit.html.erb
+53
-38
53 additions, 38 deletions
...min/communication/blocks/templates/gallery/_edit.html.erb
with
53 additions
and
38 deletions
app/views/admin/communication/blocks/templates/gallery/_edit.html.erb
+
53
−
38
View file @
2336b6e4
...
...
@@ -2,52 +2,67 @@
<div
class=
"col-xl-6"
>
<%=
block_component_edit
:description
%>
</div>
<div
class=
"col-xl-6"
>
<%=
block_component_edit
:layout
%>
</div>
</div>
<%=
block_component_
add_element
t
(
'.add_image'
)
%>
<%=
block_component_
edit
:layout
,
horizontal:
true
%>
<d
raggable
:list
=
"data.elements
"
handle=
".imageHandle
"
>
<
div
v-for=
"(element, index) in data.elements
"
>
<div
class=
"card"
>
<div
class=
"card-header border-bottom"
>
<a
class=
"btn ps-0 pt-0 imageHandle"
>
<i
class=
"fa fa-bars handle"
></i
>
</a
>
<div
class=
"
float-en
d"
>
<a
class=
"
btn btn-sm btn-dang
er"
v-on:click=
"data.elements.splice(data.elements.indexOf(element), 1)"
title=
"
<%=
t
'.remove_image'
%>
"
>
<i
class=
"fas fa-times"
></i
>
</
a
>
<d
iv
v-show
=
"data.elements
.length > 1
"
>
<
hr
class=
"my-5
"
>
<p>
Déplacer les images ci-dessous pour les mettre dans l'ordre souhaité
</p
>
<draggable
:list=
"data.elements"
class=
"row"
>
<div
v-for=
"(element, index) in data.elements"
class=
"col-xxl-1 col-lg-2 col-4"
>
<div
class=
"
car
d"
>
<div
class=
"
card-header p-1 text-cent
er"
>
<i
class=
"fas fa-arrows-alt"
></i>
</div
>
<div
v-if=
"element.image.id"
>
<
img
:src=
"getImageUrl(element.image)"
class=
"img-fluid"
/>
</div>
</div>
<div
class=
"card-body"
>
<div
class=
"flex-fill"
>
<div
class=
"row mb-n3"
>
<div
class=
"col-lg-6"
>
<%=
block_component_edit
:image
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.input.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.input.placeholder'
)
%>
</div>
<div
class=
"col-lg-6"
>
<%=
block_component_edit
:alt
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.alt.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.alt.placeholder'
)
%>
<%=
block_component_edit
:credit
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.credit.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.credit.placeholder'
)
%>
<%=
block_component_edit
:text
,
template:
@element
%>
</div>
</draggable>
</div>
<hr
class=
"my-5"
>
<p>
Envoyer les images et saisir les textes ci-dessous
</p>
<div
v-for=
"(element, index) in data.elements"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<div
class=
"float-end"
>
<a
class=
"btn btn-sm btn-danger"
v-on:click=
"data.elements.splice(data.elements.indexOf(element), 1)"
title=
"
<%=
t
'.remove_image'
%>
"
>
<i
class=
"fas fa-times"
></i>
</a>
</div>
<div
class=
"flex-fill"
>
<div
class=
"row mb-n3"
>
<div
class=
"col-lg-6"
>
<%=
block_component_edit
:image
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.input.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.input.placeholder'
)
%>
</div>
<div
class=
"col-lg-6"
>
<%=
block_component_edit
:alt
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.alt.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.alt.placeholder'
)
%>
<%=
block_component_edit
:credit
,
template:
@element
,
label:
t
(
'admin.communication.blocks.components.image.credit.label'
),
placeholder:
t
(
'admin.communication.blocks.components.image.credit.placeholder'
)
%>
<%=
block_component_edit
:text
,
template:
@element
%>
</div>
</div>
</div>
</div>
</div>
</draggable>
</div>
<%=
block_component_add_element
t
(
'.add_image'
)
%>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment