Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumazeau committed Oct 12, 2023
1 parent 14a61bb commit 54a34d7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 42 deletions.
82 changes: 40 additions & 42 deletions src/Infrastructure/Resources/views/_pagination.html.twig
Original file line number Diff line number Diff line change
@@ -1,49 +1,47 @@
{% spaceless %}
{% if nbPages > 1 %}
<nav>
<ul class="terms-pagination">
<li class="{% if currentPage == 1 %}disabled{% endif %}">
<button type="button" class="page-link" {% if currentPage == 1 %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} - 1)">
<i class="icon-arrow_back picto"></i>
</button>
</li>
{% if nbPages > 1 %}
<nav>
<ul class="terms-pagination">
<li class="{% if currentPage == 1 %}disabled{% endif %}">
<button type="button" class="page-link" {% if currentPage == 1 %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} - 1)">
<i class="icon-arrow_back picto"></i>
</button>
</li>

{% for i in 1..nbPages %}
{% if 0 == (currentPage - 3) - loop.index %}
<li>
<button type="button" class="page-link" onclick="paginationGoTo(1)">1</button>
</li>
{% for i in 1..nbPages %}
{% if 0 == (currentPage - 3) - loop.index %}
<li>
<button type="button" class="page-link" onclick="paginationGoTo(1)">1</button>
</li>

{% if 1 != loop.index %}
<li class="disabled"><span class="page-numbers page-link">...</span></li>
{% endif %}
{% elseif 0 == (currentPage + 3) - loop.index and (currentPage + 3) < nbPages %}
{% if 1 != loop.index %}
<li class="disabled"><span class="page-numbers page-link">...</span></li>
{% elseif 0 < (currentPage - 3) - loop.index %}
{% elseif 0 > (currentPage + 3) - loop.index %}
{% endif %}
{% elseif 0 == (currentPage + 3) - loop.index and (currentPage + 3) < nbPages %}
<li class="disabled"><span class="page-numbers page-link">...</span></li>
{% elseif 0 < (currentPage - 3) - loop.index %}
{% elseif 0 > (currentPage + 3) - loop.index %}
{% else %}
{% if currentPage == loop.index %}
<li class="current"><span class="page-numbers current page-link" aria-current="page">{{ loop.index }}</span></li>
{% else %}
{% if currentPage == loop.index %}
<li class="current"><span class="page-numbers current page-link" aria-current="page">{{ loop.index }}</span></li>
{% else %}
<li>
<button type="button" class="page-link" onclick="paginationGoTo({{ loop.index }})">{{ loop.index }}</button>
</li>
{% endif %}

<li>
<button type="button" class="page-link" onclick="paginationGoTo({{ loop.index }})">{{ loop.index }}</button>
</li>
{% endif %}
{% endfor %}
{% if currentPage != nbPages and (currentPage + 3) < nbPages %}
<li>
<button type="button" class="page-link" onclick="paginationGoTo({{ nbPages }})">{{ nbPages }}</button>
</li>
{% endif %}

<li class="{% if currentPage >= nbPages %}disabled{% endif %}">
<button type="button" class="page-link" {% if currentPage >= nbPages %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} + 1)">
<i class="icon-arrow_forward picto"></i>
</button>
{% endif %}
{% endfor %}
{% if currentPage != nbPages and (currentPage + 3) < nbPages %}
<li>
<button type="button" class="page-link" onclick="paginationGoTo({{ nbPages }})">{{ nbPages }}</button>
</li>
</ul>
</nav>
{% endif %}
{% endspaceless %}
{% endif %}

<li class="{% if currentPage >= nbPages %}disabled{% endif %}">
<button type="button" class="page-link" {% if currentPage >= nbPages %}disabled="disabled"{% endif %} onclick="paginationGoTo({{ currentPage }} + 1)">
<i class="icon-arrow_forward picto"></i>
</button>
</li>
</ul>
</nav>
{% endif %}
1 change: 1 addition & 0 deletions src/Infrastructure/Resources/views/_styles.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
border: 1px solid var(--terms-module-form-field-placeholder);
box-sizing: border-box;
color: var(--terms-module-form-field-color);
font-size: 13px;
font-family: var(--terms-module-font-family);
height: 32px;
padding: 5px 14px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
color: var(--terms-module-gray);
font-weight: bold;
padding-bottom: 10px;
font-size: 13px;
}
.row-header button {
color: var(--terms-module-gray);
font-weight: bold;
}
.terms-row .terms-col {
Expand Down

0 comments on commit 54a34d7

Please sign in to comment.