Upravil jsem:
responzivitu layoutu, menu, karet, filtrů, tlačítek, tabulek a log panelů v styles.css tabulky se na menších šířkách horizontálně posouvají místo rozbíjení layoutu menu má teď přímé položky Přehled, Služby a rozbalovací skupiny Provoz, Správa stránkování se vůbec nezobrazuje, pokud existuje jen jedna stránka Předchozí / Další se nezobrazují, když daný směr není dostupný odstranil jsem staré neaktivní disabled pagination odkazy
This commit is contained in:
+21
-9
@@ -167,16 +167,28 @@ def apps_page(
|
||||
params["status"] = selected_status
|
||||
return f"/portal/apps?{urlencode(params)}"
|
||||
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_apps}</span>
|
||||
<div class="pagination-actions">
|
||||
<a class="btn btn-secondary{' disabled' if page_number <= 1 else ''}" href="{page_url(max(1, page_number - 1))}">Předchozí</a>
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
<a class="btn btn-secondary{' disabled' if page_number >= total_pages else ''}" href="{page_url(min(total_pages, page_number + 1))}">Další</a>
|
||||
previous_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number - 1)}">Předchozí</a>'
|
||||
if page_number > 1
|
||||
else ""
|
||||
)
|
||||
next_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number + 1)}">Další</a>'
|
||||
if page_number < total_pages
|
||||
else ""
|
||||
)
|
||||
pagination = ""
|
||||
if total_pages > 1:
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_apps}</span>
|
||||
<div class="pagination-actions">
|
||||
{previous_link}
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
{next_link}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
"""
|
||||
|
||||
return page(
|
||||
"Služby",
|
||||
|
||||
+21
-13
@@ -225,20 +225,28 @@ async def deployments_page(
|
||||
source_options = render_options(options["sources"], selected_source, "Všechny zdroje")
|
||||
first_item = offset + 1 if total_deployments else 0
|
||||
last_item = min(offset + len(deployments), total_deployments)
|
||||
previous_disabled = " disabled" if page_number <= 1 else ""
|
||||
next_disabled = " disabled" if page_number >= total_pages else ""
|
||||
previous_href = pagination_url(max(1, page_number - 1), selected_status, selected_app, selected_source)
|
||||
next_href = pagination_url(min(total_pages, page_number + 1), selected_status, selected_app, selected_source)
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_deployments}</span>
|
||||
<div class="pagination-actions">
|
||||
<a class="btn btn-secondary{previous_disabled}" href="{previous_href}" aria-disabled="{str(page_number <= 1).lower()}">Předchozí</a>
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
<a class="btn btn-secondary{next_disabled}" href="{next_href}" aria-disabled="{str(page_number >= total_pages).lower()}">Další</a>
|
||||
previous_link = (
|
||||
f'<a class="btn btn-secondary" href="{pagination_url(page_number - 1, selected_status, selected_app, selected_source)}">Předchozí</a>'
|
||||
if page_number > 1
|
||||
else ""
|
||||
)
|
||||
next_link = (
|
||||
f'<a class="btn btn-secondary" href="{pagination_url(page_number + 1, selected_status, selected_app, selected_source)}">Další</a>'
|
||||
if page_number < total_pages
|
||||
else ""
|
||||
)
|
||||
pagination = ""
|
||||
if total_pages > 1:
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_deployments}</span>
|
||||
<div class="pagination-actions">
|
||||
{previous_link}
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
{next_link}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
"""
|
||||
|
||||
return page(
|
||||
"Nasazení",
|
||||
|
||||
+21
-9
@@ -221,16 +221,28 @@ def jobs_page(
|
||||
params["target"] = selected_target
|
||||
return f"/portal/jobs?{urlencode(params)}"
|
||||
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_jobs}</span>
|
||||
<div class="pagination-actions">
|
||||
<a class="btn btn-secondary{' disabled' if page_number <= 1 else ''}" href="{page_url(max(1, page_number - 1))}">Předchozí</a>
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
<a class="btn btn-secondary{' disabled' if page_number >= total_pages else ''}" href="{page_url(min(total_pages, page_number + 1))}">Další</a>
|
||||
previous_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number - 1)}">Předchozí</a>'
|
||||
if page_number > 1
|
||||
else ""
|
||||
)
|
||||
next_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number + 1)}">Další</a>'
|
||||
if page_number < total_pages
|
||||
else ""
|
||||
)
|
||||
pagination = ""
|
||||
if total_pages > 1:
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_jobs}</span>
|
||||
<div class="pagination-actions">
|
||||
{previous_link}
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
{next_link}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
"""
|
||||
|
||||
return page(
|
||||
"Úlohy",
|
||||
|
||||
+21
-9
@@ -115,16 +115,28 @@ def workers_page(
|
||||
params["q"] = query
|
||||
return f"/portal/workers?{urlencode(params)}"
|
||||
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_filtered}</span>
|
||||
<div class="pagination-actions">
|
||||
<a class="btn btn-secondary{' disabled' if page_number <= 1 else ''}" href="{page_url(max(1, page_number - 1))}">Předchozí</a>
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
<a class="btn btn-secondary{' disabled' if page_number >= total_pages else ''}" href="{page_url(min(total_pages, page_number + 1))}">Další</a>
|
||||
previous_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number - 1)}">Předchozí</a>'
|
||||
if page_number > 1
|
||||
else ""
|
||||
)
|
||||
next_link = (
|
||||
f'<a class="btn btn-secondary" href="{page_url(page_number + 1)}">Další</a>'
|
||||
if page_number < total_pages
|
||||
else ""
|
||||
)
|
||||
pagination = ""
|
||||
if total_pages > 1:
|
||||
pagination = f"""
|
||||
<div class="pagination">
|
||||
<span>Zobrazeno {first_item}-{last_item} z {total_filtered}</span>
|
||||
<div class="pagination-actions">
|
||||
{previous_link}
|
||||
<span class="page-indicator">Strana {page_number} / {total_pages}</span>
|
||||
{next_link}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"""
|
||||
"""
|
||||
status_options = "".join(
|
||||
f'<option value="{value}"{" selected" if selected_status == value else ""}>{label}</option>'
|
||||
for value, label in [("", "Všichni workeři"), ("online", "Online"), ("offline", "Offline")]
|
||||
|
||||
Reference in New Issue
Block a user