Skip to content
Snippets Groups Projects
Commit 6af5ea82 authored by cyroxx's avatar cyroxx
Browse files

assembly: add edit button inline

parent 57d2ad30
No related branches found
No related tags found
No related merge requests found
...@@ -22,10 +22,7 @@ ...@@ -22,10 +22,7 @@
<li class="breadcrumb-item active" aria-current="page">{{ assembly.name }}</li> <li class="breadcrumb-item active" aria-current="page">{{ assembly.name }}</li>
</ol> </ol>
</nav> </nav>
<p> {{ titleMacro.title(assembly.name, edit_url=url('backoffice:assembly-edit', pk=assembly.id), fav_type=true, color="primary") }}
<a href="{{ url('backoffice:assembly-edit', pk=assembly.id) }}"><i class="bi bi-pencil-square"></i></a>
</p>
{{ titleMacro.title(assembly.name) }}
{% if assembly.parent %} {% if assembly.parent %}
<h2 class="text-center">{{ _('Part of') }} <a href="{{ url('plainui:assembly', assembly_slug=assembly.parent.slug ) }}">{{ assembly.parent }}</a></h3> <h2 class="text-center">{{ _('Part of') }} <a href="{{ url('plainui:assembly', assembly_slug=assembly.parent.slug ) }}">{{ assembly.parent }}</a></h3>
{% endif %} {% endif %}
......
...@@ -85,8 +85,6 @@ ...@@ -85,8 +85,6 @@
{% macro edit(edit, title=_("edit this"), color="transparent" ) -%} {% macro edit(edit, title=_("edit this"), color="transparent" ) -%}
<a href="{{ edit }}" class="me-2 btn-icon-big btn btn-{{ color }}" title="{{ title }}"> <a href="{{ edit }}" class="me-2 btn-icon-big btn btn-{{ color }}" title="{{ title }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16"> <i class="bi bi-pencil"></i>
<path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
</svg>
</a> </a>
{%- endmacro %} {%- endmacro %}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#} #}
{% import "plainui/components/function_btns.html" as fbtns with context %} {% import "plainui/components/function_btns.html" as fbtns with context %}
{% macro title(title="", fav_id=false, fav_type=false, fav_is=false, sch_id=false, sch_is=false, share_url=false, stream_url=false, report_url=false, report_kind="url", edit_url=false) -%} {% macro title(title="", fav_id=false, fav_type=false, fav_is=false, sch_id=false, sch_is=false, share_url=false, stream_url=false, report_url=false, report_kind="url", edit_url=false, color="transparent") -%}
<div class="row {% if share_url %}w-100 my-11{% endif %}"> <div class="row {% if share_url %}w-100 my-11{% endif %}">
<div class="col"> <div class="col">
<h1 class="text-center p-3" title="{{ title }}">{{ title }}</h1> <h1 class="text-center p-3" title="{{ title }}">{{ title }}</h1>
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
{% if conf and share_url or fav_type or sch_id or stream_url %} {% if conf and share_url or fav_type or sch_id or stream_url %}
<div class="col-sm-auto text-righ align-self-center"> <div class="col-sm-auto text-righ align-self-center">
{% if share_url %} {% if share_url %}
{{ fbtns.share(share_url, color="transparent") }} {{ fbtns.share(share_url, color=color) }}
{% endif %} {% endif %}
{% if fav_type and fav_id %} {% if fav_type and fav_id %}
{{ fbtns.fav(fav_id, fav_type, fav_is, color="transparent") }} {{ fbtns.fav(fav_id, fav_type, fav_is, color=color) }}
{% endif %} {% endif %}
{% if sch_id %} {% if sch_id %}
{{ fbtns.schedule(sch_id, sch_is, color="transparent") }} {{ fbtns.schedule(sch_id, sch_is, color=color) }}
{% endif %} {% endif %}
{% if stream_url %} {% if stream_url %}
{{ fbtns.stream(stream_url, color="transparent") }} {{ fbtns.stream(stream_url, color=color) }}
{% endif %} {% endif %}
{% if edit_url %} {% if edit_url %}
{{ fbtns.edit(edit_url, color="transparent") }} {{ fbtns.edit(edit_url, color=color) }}
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment