Skip to content
Snippets Groups Projects
Unverified Commit ade0d4fe authored by Saurabh Kumar's avatar Saurabh Kumar Committed by GitHub
Browse files

Update "Admin", "feed's related item" & "Goto Dashboard" button icons (#3922)


- Rename "Apply Admin" to "Admin" 
- Adds "Admin" icon to the user's profile page along with the
"Dashboard" link, makes it easier to goto admin without going to
dashboard everytime first.
- Update icons for "dashboard" and "Admin" to use heroicons.
- Update activity feed related link icon + it's visuals
- Remove `arrow-head-pixels--solid` icon from the sprite as it's no
longer in use anywhere.


Co-authored-by: default avatarFredrik Jonsson <frjo@xdeb.org>
parent 8e306048
No related branches found
No related tags found
1 merge request!89Upgrade to 5.10.0
...@@ -66,15 +66,14 @@ ...@@ -66,15 +66,14 @@
{% if not submission_title and activity|user_can_see_related:request.user %} {% if not submission_title and activity|user_can_see_related:request.user %}
<div class="px-3"> {% with url=activity.related_object.get_absolute_url %}
{% with url=activity.related_object.get_absolute_url %} {% if url %}
{% if url %} <a href="{{ url }}" class="p-1 ms-2 mt-2 text-sm inline-flex items-center hover:opacity-70 transition-opacity font-bold">
<a href="{{ url }}" target="_blank" class="feed__related-item"> <span class="uppercase">{% trans "View " %}{{ activity.related_object|model_verbose_name }}</span>
{% trans "View " %}{{ activity.related_object|model_verbose_name }} <svg class="icon inline"><use xlink:href="#arrow-head-pixels--solid"></use></svg> {% heroicon_micro "chevron-double-right" class="inline w-4 h-4 ms-1" aria_hidden=true %}
</a> </a>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
</div>
{% endif %} {% endif %}
</div> </div>
......
{% extends "base-apply.html" %} {% extends "base-apply.html" %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load i18n static markdown_tags nh3_tags %} {% load i18n static markdown_tags nh3_tags heroicons %}
{% block title %}{% trans "Dashboard" %}{% endblock %} {% block title %}{% trans "Dashboard" %}{% endblock %}
...@@ -8,10 +8,12 @@ ...@@ -8,10 +8,12 @@
{% adminbar %} {% adminbar %}
{% slot header %}{% trans "Dashboard" %}{% endslot %} {% slot header %}{% trans "Dashboard" %}{% endslot %}
<a href="{% url 'wagtailadmin_home' %}" class="button button--primary button--arrow-pixels-white"> {% if perms.wagtailadmin.access_admin %}
{% trans "Apply admin" %} <a href="{% url 'wagtailadmin_home' %}" class="button button--primary">
<svg><use xlink:href="#arrow-head-pixels--solid"></use></svg> {% heroicon_mini "wrench-screwdriver" size=20 class="mr-1 inline align-text-bottom" %}
</a> {% trans "Admin" %}
</a>
{% endif %}
{% endadminbar %} {% endadminbar %}
<div class="wrapper wrapper--large wrapper--inner-space-medium"> <div class="wrapper wrapper--large wrapper--inner-space-medium">
......
{% extends "base-apply.html" %} {% extends "base-apply.html" %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load i18n static nh3_tags markdown_tags %} {% load i18n static nh3_tags markdown_tags heroicons %}
{% block extra_css %} {% block extra_css %}
{{ my_reviewed.filterset.form.media.css }} {{ my_reviewed.filterset.form.media.css }}
...@@ -9,15 +9,14 @@ ...@@ -9,15 +9,14 @@
{% block title %}{% trans "Dashboard" %}{% endblock %} {% block title %}{% trans "Dashboard" %}{% endblock %}
{% block content %} {% block content %}
{% adminbar %} {% adminbar %}
{% slot header %}{% trans "Dashboard" %}{% endslot %} {% slot header %}{% trans "Dashboard" %}{% endslot %}
{% slot sub_heading %}{% trans "Welcome" %}, {{ request.user }}!{% endslot %} {% slot sub_heading %}{% trans "Welcome" %}, {{ request.user }}!{% endslot %}
{% if perms.wagtailadmin.access_admin %} {% if perms.wagtailadmin.access_admin %}
<a href="{% url 'wagtailadmin_home' %}" id="wagtail-admin-button" class="button button--primary button--arrow-pixels-white"> <a href="{% url 'wagtailadmin_home' %}" id="wagtail-admin-button" class="button button--primary">
{% trans "Apply admin" %} {% heroicon_mini "wrench-screwdriver" size=20 class="mr-1 inline align-text-bottom" %}
<svg><use xlink:href="#arrow-head-pixels--solid"></use></svg> {% trans "Admin" %}
</a> </a>
{% endif %} {% endif %}
{% endadminbar %} {% endadminbar %}
......
{% extends "base-apply.html" %} {% extends "base-apply.html" %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% load i18n static markdown_tags nh3_tags %} {% load i18n static markdown_tags nh3_tags heroicons %}
{% block title %}{% trans "Dashboard" %}{% endblock %} {% block title %}{% trans "Dashboard" %}{% endblock %}
{% block content %} {% block content %}
{% adminbar %} {% adminbar %}
{% slot header %}{% trans "Dashboard" %}{% endslot %} {% slot header %}{% trans "Dashboard" %}{% endslot %}
<a href="{% url 'wagtailadmin_home' %}" class="button button--primary button--arrow-pixels-white">
{% trans "Apply admin" %} {% if perms.wagtailadmin.access_admin %}
<svg><use xlink:href="#arrow-head-pixels--solid"></use></svg> <a href="{% url 'wagtailadmin_home' %}" class="button button--primary">
</a> {% heroicon_mini "wrench-screwdriver" size=20 class="mr-1 inline align-text-bottom" %}
{% trans "Admin" %}
</a>
{% endif %}
{% endadminbar %} {% endadminbar %}
<div class="wrapper wrapper--large wrapper--inner-space-medium"> <div class="wrapper wrapper--large wrapper--inner-space-medium">
......
{% extends 'base-apply.html' %} {% extends 'base-apply.html' %}
{% load i18n static %} {% load i18n static heroicons %}
{% block content %} {% block content %}
{% adminbar %} {% adminbar %}
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
{% comment %} {% slot sub_heading %}{% trans "All submissions ready for discussion." %}{% endslot %} {% endcomment %} {% comment %} {% slot sub_heading %}{% trans "All submissions ready for discussion." %}{% endslot %} {% endcomment %}
{% if user.can_access_dashboard %} {% if user.can_access_dashboard %}
<a href="{% url 'dashboard:dashboard' %}" class="button button--primary button--arrow-pixels-white" hx-boost='true'> <a href="{% url 'dashboard:dashboard' %}" class="button button--primary" hx-boost='true'>
{% heroicon_mini "squares-2x2" size=20 class="mr-1 inline align-text-bottom" %}
{% trans "Go to my dashboard" %} {% trans "Go to my dashboard" %}
<svg><use xlink:href="#arrow-head-pixels--solid"></use></svg>
</a> </a>
{% endif %} {% endif %}
{% endadminbar %} {% endadminbar %}
......
{% extends 'base-apply.html' %} {% extends 'base-apply.html' %}
{% load i18n users_tags wagtailcore_tags %} {% load i18n users_tags wagtailcore_tags heroicons %}
{% block title %}{% trans "Account" %}{% endblock %} {% block title %}{% trans "Account" %}{% endblock %}
...@@ -8,23 +8,31 @@ ...@@ -8,23 +8,31 @@
{% slot header %}{% trans "Welcome" %} {{ user }}{% endslot %} {% slot header %}{% trans "Welcome" %} {{ user }}{% endslot %}
{% slot sub_heading %}{% trans "Manage your account details and security." %}{% endslot %} {% slot sub_heading %}{% trans "Manage your account details and security." %}{% endslot %}
{% if user.can_access_dashboard %} <span class="flex gap-4">
<a href="{% url 'dashboard:dashboard' %}" class="button button--primary button--arrow-pixels-white" hx-boost='true'> {% if user.can_access_dashboard %}
{% trans "Go to my dashboard" %} <a href="{% url 'dashboard:dashboard' %}" class="button button--primary">
<svg><use xlink:href="#arrow-head-pixels--solid"></use></svg> {% heroicon_mini "squares-2x2" size=20 class="mr-1 inline align-text-bottom" %}
</a> {% trans "Go to my dashboard" %}
{% else %} </a>
<div class="wrapper wrapper--cta-box flex items-center"> {% else %}
<div class="flex-1"> <div class="wrapper wrapper--cta-box flex items-center">
<h3 class="heading heading--no-margin font-bold">{% trans "Submit a new application" %}</h3> <div class="flex-1">
<p class="text-base m-0">{% trans "Apply now for our open rounds" %}</p> <h3 class="heading heading--no-margin font-bold">{% trans "Submit a new application" %}</h3>
<p class="text-base m-0">{% trans "Apply now for our open rounds" %}</p>
</div>
<div>
<a class="button button--blue-white" href="{% pageurl APPLY_SITE.root_page %}" class="button">{% trans "Apply" %}</a>
</div>
</div> </div>
<div>
<a class="button button--blue-white" href="{% pageurl APPLY_SITE.root_page %}" class="button">{% trans "Apply" %}</a>
</div>
</div>
{% endif %} {% endif %}
{% if perms.wagtailadmin.access_admin %}
<a href="{% url 'wagtailadmin_home' %}" id="wagtail-admin-button" class="button button--primary">
{% heroicon_mini "wrench-screwdriver" size=20 class="mr-1 inline align-text-bottom" %}
{% trans "Admin" %}
</a>
{% endif %}
</span>
{% endadminbar %} {% endadminbar %}
<div class="profile"> <div class="profile">
......
...@@ -20,14 +20,6 @@ ...@@ -20,14 +20,6 @@
<path d="M4 19V17.5H13.65V19H4ZM4 14.825V13.325H20V14.825H4ZM4 10.675V9.175H20V10.675H4ZM4 6.5V5H20V6.5H4Z" fill="black"/> <path d="M4 19V17.5H13.65V19H4ZM4 14.825V13.325H20V14.825H4ZM4 10.675V9.175H20V10.675H4ZM4 6.5V5H20V6.5H4Z" fill="black"/>
</symbol> </symbol>
<symbol id="arrow-head-pixels--solid" viewBox="0 0 50 75">
<g fill-rule="evenodd">
<path d="M0 50h25v25H0z" />
<path d="M25 25h25v25H25z" />
<path d="M0 0h25v25H0z" />
</g>
</symbol>
<symbol id="request-changes" viewBox="0 0 16 16" fill="none"> <symbol id="request-changes" viewBox="0 0 16 16" fill="none">
<path d="M8 15.2875C11.9764 15.2875 15.2 12.064 15.2 8.08751C15.2 4.11106 11.9764 0.887512 8 0.887512C4.02355 0.887512 0.799999 4.11106 0.799999 8.08751C0.799999 12.064 4.02355 15.2875 8 15.2875Z" stroke="#F05E54"/> <path d="M8 15.2875C11.9764 15.2875 15.2 12.064 15.2 8.08751C15.2 4.11106 11.9764 0.887512 8 0.887512C4.02355 0.887512 0.799999 4.11106 0.799999 8.08751C0.799999 12.064 4.02355 15.2875 8 15.2875Z" stroke="#F05E54"/>
<path d="M7.54625 9.5375L7.54625 4.11249L8.47594 4.11249L8.47594 9.5375L7.54625 9.5375ZM8.64 11.4937C8.64 11.6354 8.58531 11.7542 8.47594 11.85C8.36135 11.95 8.2051 12 8.00719 12C7.80927 12 7.65302 11.95 7.53844 11.85C7.41865 11.7542 7.35875 11.6354 7.35875 11.4937C7.35875 11.3562 7.41865 11.2375 7.53844 11.1375C7.65302 11.0417 7.80927 10.9937 8.00719 10.9937C8.2051 10.9937 8.36135 11.0417 8.47594 11.1375C8.58531 11.2375 8.64 11.3562 8.64 11.4937Z" fill="#F05E54"/> <path d="M7.54625 9.5375L7.54625 4.11249L8.47594 4.11249L8.47594 9.5375L7.54625 9.5375ZM8.64 11.4937C8.64 11.6354 8.58531 11.7542 8.47594 11.85C8.36135 11.95 8.2051 12 8.00719 12C7.80927 12 7.65302 11.95 7.53844 11.85C7.41865 11.7542 7.35875 11.6354 7.35875 11.4937C7.35875 11.3562 7.41865 11.2375 7.53844 11.1375C7.65302 11.0417 7.80927 10.9937 8.00719 10.9937C8.2051 10.9937 8.36135 11.0417 8.47594 11.1375C8.58531 11.2375 8.64 11.3562 8.64 11.4937Z" fill="#F05E54"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment