Projet

Général

Profil

0001-misc-put-evolution-metadata-in-a-p-tag-71091.patch

Frédéric Péters, 08 novembre 2022 17:23

Télécharger (3,95 ko)

Voir les différences:

Subject: [PATCH] misc: put evolution metadata in a <p> tag (#71091)

 tests/form_pages/test_formdata.py       | 6 +++---
 wcs/qommon/static/css/dc2/admin.scss    | 2 +-
 wcs/qommon/static/css/qommon.scss       | 2 +-
 wcs/templates/wcs/formdata_history.html | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
tests/form_pages/test_formdata.py
1613 1613
    assert formdata.evolution[0].parts[1].to is None
1614 1614
    resp = app.get('/test/%s/' % formdata.id)
1615 1615
    resp.status_int = 200
1616
    assert resp.html.find('div', {'id': 'evolution-log'}).find('p').text == 'Hello World'
1616
    assert resp.pyquery.find('#evolutions .msg p').text() == 'Hello World'
1617 1617

  
1618 1618
    # register comment to other users
1619 1619
    formdef.data_class().wipe()
......
1633 1633
    assert formdata.evolution[0].parts[1].to == [role1.id]
1634 1634
    resp = app.get('/test/%s/' % formdata.id)
1635 1635
    resp.status_int = 200
1636
    assert not resp.html.find('div', {'id': 'evolution-log'}).find('p')
1636
    assert resp.pyquery.find('#evolutions .msg p').length == 0
1637 1637

  
1638 1638
    # register comment to this user
1639 1639
    formdef.data_class().wipe()
......
1653 1653
    assert formdata.evolution[0].parts[1].to == [role2.id]
1654 1654
    resp = app.get('/test/%s/' % formdata.id)
1655 1655
    resp.status_int = 200
1656
    assert resp.html.find('div', {'id': 'evolution-log'}).find('p').text == 'Hello World'
1656
    assert resp.pyquery.find('#evolutions .msg p').text() == 'Hello World'
1657 1657

  
1658 1658

  
1659 1659
def test_formdata_evolution_registercommenter_to_with_attachment(pub):
wcs/qommon/static/css/dc2/admin.scss
1987 1987
	display: block;
1988 1988
}
1989 1989

  
1990
ul#evolutions div.evolution-metadata {
1990
ul#evolutions .evolution-metadata {
1991 1991
	border: none;
1992 1992
	margin-left: 70px;
1993 1993
	padding: 0.5rem;
wcs/qommon/static/css/qommon.scss
490 490
	z-index: -10;
491 491
}
492 492

  
493
ul#evolutions div.evolution-metadata {
493
ul#evolutions .evolution-metadata {
494 494
	width: auto;
495 495
	display: inline-block;
496 496
	background: white;
wcs/templates/wcs/formdata_history.html
13 13
            <span class="item {% if not evolution.status %}no-status-change{% endif %}" style="background: #{{ status.colour }}; color: {{ status.get_contrast_color}}"></span>
14 14
            <div>
15 15
              {% if evolution.status %}
16
                <div class="evolution-metadata">
16
                <p class="evolution-metadata">
17 17
                  <span class="status">{{evolution.get_status_label}}
18 18
                    {% if status.get_visibility_restricted_roles %}
19 19
                      <span title="{% trans "This status is not visible to users" %}" class="visibility-off"></span>
......
24 24
                      <span class="last-jump">({% trans "last check:" %} {{ evolution.last_jump_datetime }})</span>
25 25
                    {% endif %}
26 26
                  </span>
27
                </div>
27
                </p>
28 28
              {% endif %}
29 29
              <div class="msg">
30 30
                {% if evolution.who and include_authors %}
31
-