Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
latoilescoute-dev
scoodle
Commits
991f51aa
Commit
991f51aa
authored
Mar 21, 2018
by
Thomas Citharel
Browse files
Fix left editing button always shown
Signed-off-by:
Thomas Citharel
<
tcit@tcit.fr
>
parent
bfc986a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
tpl/part/vote_table_classic.tpl
View file @
991f51aa
...
...
@@ -101,7 +101,13 @@
<tr>
<th
class=
"bg-info"
>
{
$vote
->
name
|
html
}
{
if
$slots
gt
4
}
{
if
$active
&&
!
$expired
&&
$accessGranted
&&
(
$poll
->
editable
==
constant
(
'Framadate\Editable::EDITABLE_BY_ALL'
)
or
$admin
or
(
$poll
->
editable
==
constant
(
'Framadate\Editable::EDITABLE_BY_OWN'
)
&&
$editedVoteUniqueId
==
$vote
->
uniqId
)
)
&&
$slots
gt
4
}
<span
class=
"edit-username-left"
>
<a
href=
"
{
if
$admin
}{
poll_url
id
=
$poll
->
admin_id
vote_id
=
$vote
->
uniqId
admin
=
true
}{
else
}{
poll_url
id
=
$poll
->
id
vote_id
=
$vote
->
uniqId
}{/
if
}
"
class=
"btn btn-default btn-sm"
title=
"{__f('Poll results', 'Edit the line: %s', $vote->name)|html}"
>
<i
class=
"glyphicon glyphicon-pencil"
></i><span
class=
"sr-only"
>
{__('Generic', 'Edit')}
</span>
...
...
@@ -168,7 +174,7 @@
{
foreach
$slots
as
$id
=>
$slot
}
<td
class=
"bg-info"
headers=
"C
{
$id
}
"
>
<ul
class=
"list-unstyled choice"
>
{
if
$best_choices
[
'y'
][
$i
]
lt
$poll
->
ValueMax
||
$poll
->
ValueMax
eq
NULL
}
{
if
$poll
->
ValueMax
eq
NULL
||
$best_choices
[
'y'
][
$i
]
lt
$poll
->
ValueMax
}
<li
class=
"yes"
>
<input
type=
"radio"
id=
"y-choice-
{
$id
}
"
name=
"choices[
{
$id
}
]"
value=
"2"
/>
<label
class=
"btn btn-default btn-xs"
for=
"y-choice-
{
$id
}
"
title=
"{__('Poll results', 'Vote yes for')|html}
{
$slot
->
title
|
html
}
"
>
...
...
tpl/part/vote_table_date.tpl
View file @
991f51aa
...
...
@@ -153,9 +153,15 @@
<tr>
{* Voted line *}
<th
class=
"bg-info"
>
{
$vote
->
name
|
html
}
{
if
$slots
gt
4
}
{
if
$active
&&
!
$expired
&&
$accessGranted
&&
(
$poll
->
editable
==
constant
(
'Framadate\Editable::EDITABLE_BY_ALL'
)
or
$admin
or
(
$poll
->
editable
==
constant
(
'Framadate\Editable::EDITABLE_BY_OWN'
)
&&
$editedVoteUniqueId
==
$vote
->
uniqId
)
)
&&
$slots
|
count
gt
4
}
<span
class=
"edit-username-left"
>
<a
href=
"
{
if
$admin
}{
poll_url
id
=
$poll
->
admin_id
vote_id
=
$vote
->
uniqId
admin
=
true
}{
else
}{
poll_url
id
=
$poll
->
id
vote_id
=
$vote
->
uniqId
}{/
if
}
"
class=
"btn btn-default btn-sm"
title=
"{__f('Poll results', 'Edit the line: %s', $vote->name)|html}"
>
<i
class=
"glyphicon glyphicon-pencil"
></i><span
class=
"sr-only"
>
{__('Generic', 'Edit')}
</span>
...
...
@@ -232,7 +238,7 @@
<td
class=
"bg-info"
headers=
"M
{
$headersM
[
$i
]
}
D
{
$headersD
[
$i
]
}
H
{
$headersH
[
$i
]
}
"
>
<ul
class=
"list-unstyled choice"
>
{
if
$best_choices
[
'y'
][
$i
]
lt
$poll
->
ValueMax
||
$poll
->
ValueMax
eq
NULL
}
{
if
$poll
->
ValueMax
eq
NULL
||
$best_choices
[
'y'
][
$i
]
lt
$poll
->
ValueMax
}
<li
class=
"yes"
>
<input
type=
"radio"
id=
"y-choice-
{
$i
}
"
name=
"choices[
{
$i
}
]"
value=
"2"
/>
<label
class=
"btn btn-default btn-xs"
for=
"y-choice-
{
$i
}
"
title=
"{__('Poll results', 'Vote yes for')|html}
{
$slot
->
day
|
date_format
:
$date_format.txt_short
|
html
}
-
{
$moment
|
html
}
"
>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment