Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Base lexicale BaLex
Manage
Activity
Members
Labels
Plan
Issues
18
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Lex gaMe
Base lexicale BaLex
Commits
2e52a563
Commit
2e52a563
authored
2 years ago
by
Pierre Fleutot
Browse files
Options
Downloads
Patches
Plain Diff
Home : Ajout lien Copie du mot du jour dans un lexique
parent
77b0c720
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Controller/EntryController.php
+4
-0
4 additions, 0 deletions
src/Controller/EntryController.php
src/Repository/EntryRepository.php
+1
-1
1 addition, 1 deletion
src/Repository/EntryRepository.php
templates/home.html.twig
+17
-3
17 additions, 3 deletions
templates/home.html.twig
with
22 additions
and
4 deletions
src/Controller/EntryController.php
+
4
−
0
View file @
2e52a563
...
...
@@ -83,6 +83,10 @@ class EntryController extends AppBaseController
$this
->
addFlash
(
'danger'
,
reset
(
$message
)
??
'Requête terminée'
);
}
if
(
$backUrl
=
$request
->
get
(
'backUrl'
))
{
return
$this
->
redirect
(
$backUrl
);
}
return
$this
->
redirectToRoute
(
'app_entry_show'
,
[
'id'
=>
$entry
->
getId
()]);
}
...
...
This diff is collapsed.
Click to expand it.
src/Repository/EntryRepository.php
+
1
−
1
View file @
2e52a563
...
...
@@ -129,7 +129,7 @@ class EntryRepository extends ServiceEntityRepository
return
$this
->
createQueryBuilder
(
'e'
)
->
andWhere
(
'e.lexicon = :lexicon'
)
->
setParameter
(
'lexicon'
,
$lexicon
)
->
andWhere
(
'e.updatedAt >= :date'
)
->
andWhere
(
'e.updatedAt >= :date
AND e.updatedAt != e.createdAt
'
)
->
setParameter
(
'date'
,
$date
)
->
getQuery
()
->
getResult
()
...
...
This diff is collapsed.
Click to expand it.
templates/home.html.twig
+
17
−
3
View file @
2e52a563
...
...
@@ -10,7 +10,7 @@
<div
class=
"d-inline-block text-center"
id=
"appLinksZone"
>
<i
class=
"fa fa-gamepad fa-4x"
></i>
<br>
MagicWor
l
d
<br>
MagicWord
</div>
<div
class=
"text-center"
>
...
...
@@ -37,7 +37,7 @@
{%
for
lexicon
in
app.user.myLexicons
%}
{%
if
lexicon.masterGroup
%}
<div
class=
" d-flex justify-content-between align-items-start py-2"
>
<a
href=
"
{{
path
(
'app_lexicon_show'
,
{
id
:
app.user.
lexicon.id
}
)
}}
"
>
{{
lexicon
|
badge
}}
{{
"Lexique du groupe"
|
trans
}}
«
{{
lexicon
}}
»
</a>
<a
href=
"
{{
path
(
'app_lexicon_show'
,
{
id
:
lexicon.id
}
)
}}
"
>
{{
lexicon
|
badge
}}
{{
"Lexique du groupe"
|
trans
}}
«
{{
lexicon
}}
»
</a>
<span>
{{
lexicon_manager.entriesNb
(
lexicon
)
}}
</span>
</div>
{%
endif
%}
...
...
@@ -82,7 +82,21 @@
<div
class=
"col"
>
<h1
class=
"text-center"
>
{{
"Bonjour"
|
trans
}}
{{
app.user
}}
</h1>
<h1
class=
"mt-5"
>
{{
"Mot du jour"
|
trans
}}
</h1>
<div
class=
"mt-5 d-flex justify-content-between align-items-center"
>
<h1>
{{
"Mot du jour"
|
trans
}}
</h1>
{%
if
entry
%}
<div
class=
"dropdown me-1"
>
<a
title=
"
{{
"Ajouter à un lexique"
|
trans
}}
"
href=
"#"
data-bs-toggle=
"dropdown"
aria-expanded=
"false"
><i
class=
"fa fa-2x fa-plus-circle text-success"
></i></a>
<ul
class=
"dropdown-menu"
>
{%
for
lexicon
in
app.user.myLexicons
%}
<li><a
class=
"dropdown-item"
href=
"
{{
path
(
'app_entry_copy'
,
{
id
:
entry.id
,
lexiconId
:
lexicon.id
,
backUrl
:
path
(
'app_lexicon_show'
,
{
id
:
lexicon.id
}
)
}
)
}}
"
>
{{
"Copier le mot dans le lexique"
|
trans
}}
{{
lexicon
}}
</a></li>
{%
endfor
%}
</ul>
</div>
{%
endif
%}
</div>
<div
class=
"card mt-3"
>
<div
class=
"card-body bg-pink"
>
{%
if
entry
%}
...
...
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