profile: let attribute edit/create appear on full page (#86701)
gitea/hobo/pipeline/head This commit looks good
Details
gitea/hobo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d0e4ec57fa
commit
ede17d97d0
|
@ -1,6 +1,16 @@
|
|||
{% extends "profile/attributedefinition_list.html" %}
|
||||
{% extends "hobo/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{{ block.super }}
|
||||
<a href="{% url 'profile-home' %}">{% trans 'User Profile' %}</a>
|
||||
<a href="{% url 'profile-add-attribute' %}">{% trans 'New attribute' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>{% trans 'New attribute' %}</h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<h2>{% trans 'User Profile' %}</h2>
|
||||
<span class="actions">
|
||||
<a rel="popup" href="{% url 'profile-edit-user-full-name-template' %}">{% trans 'User full name template' %}</a>
|
||||
<a rel="popup" href="{% url 'profile-add-attribute' %}">{% trans 'New attribute' %}</a>
|
||||
<a href="{% url 'profile-add-attribute' %}">{% trans 'New attribute' %}</a>
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
{% for object in object_list %}
|
||||
<div data-attribute-id="{{object.id}}" {% if object.disabled %}class="disabled"{% endif %}>
|
||||
<span class="handle">⣿</span> <span class="label">{{object.label}} <span class="extra-info">({{object.get_real_kind_display}}, "{{ object.name }}")</span></span>
|
||||
<a rel="popup" href="{% url 'profile-attribute-options' name=object.name %}">{% trans 'options' %}</a>
|
||||
<a href="{% url 'profile-attribute-options' name=object.name %}">{% trans 'options' %}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -119,7 +119,7 @@ def test_attribute_kind_not_restricted_at_model_level(db):
|
|||
|
||||
def test_profile_home_view(logged_app):
|
||||
resp = logged_app.get('/profile/', status=200)
|
||||
assert [x['href'] for x in resp.html.findAll('a', {'rel': 'popup'})][2:5] == [
|
||||
assert [x.get('href') for x in resp.pyquery('.objects-list a[href]')[:3]] == [
|
||||
'/profile/title/options',
|
||||
'/profile/first_name/options',
|
||||
'/profile/last_name/options',
|
||||
|
@ -230,7 +230,7 @@ def test_reorder_view(logged_app):
|
|||
assert resp.location == '/profile/'
|
||||
assert AttributeDefinition.objects.filter(name='last_name')[0].order == 1
|
||||
resp = resp.follow()
|
||||
assert [x['href'] for x in resp.html.findAll('a', {'rel': 'popup'})][2:5] == [
|
||||
assert [x.get('href') for x in resp.pyquery('.objects-list a[href]')[:3]] == [
|
||||
'/profile/last_name/options',
|
||||
'/profile/first_name/options',
|
||||
'/profile/title/options',
|
||||
|
|
Loading…
Reference in New Issue