kopia lustrzana https://github.com/wagtail/wagtail
				
				
				
			Fix spacing around the privacy indicator panel. (#6454)
							rodzic
							
								
									cbf65ba645
								
							
						
					
					
						commit
						b7643f869d
					
				| 
						 | 
					@ -42,6 +42,7 @@ Changelog
 | 
				
			||||||
 * Fix: The Elasticsearch `URLS` setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)
 | 
					 * Fix: The Elasticsearch `URLS` setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)
 | 
				
			||||||
 * Fix: Avoid retranslating month / weekday names that Django already provides (Matt Westcott)
 | 
					 * Fix: Avoid retranslating month / weekday names that Django already provides (Matt Westcott)
 | 
				
			||||||
 * Fix: Fixed padding around checkbox and radio inputs (Cole Maclean)
 | 
					 * Fix: Fixed padding around checkbox and radio inputs (Cole Maclean)
 | 
				
			||||||
 | 
					 * Fix: Fix spacing around the privacy indicator panel (Sævar Öfjörð Magnússon, Dan Braghis)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2.10.2 (25.09.2020)
 | 
					2.10.2 (25.09.2020)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,6 +72,8 @@ Bug fixes
 | 
				
			||||||
 * The Elasticsearch ``URLS`` setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)
 | 
					 * The Elasticsearch ``URLS`` setting can now take a string on its own instead of a list (Sævar Öfjörð Magnússon)
 | 
				
			||||||
 * Avoid retranslating month / weekday names that Django already provides (Matt Westcott)
 | 
					 * Avoid retranslating month / weekday names that Django already provides (Matt Westcott)
 | 
				
			||||||
 * Fixed padding around checkbox and radio inputs (Cole Maclean)
 | 
					 * Fixed padding around checkbox and radio inputs (Cole Maclean)
 | 
				
			||||||
 | 
					 * Fix spacing around the privacy indicator panel (Sævar Öfjörð Magnússon, Dan Braghis)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Upgrade considerations
 | 
					Upgrade considerations
 | 
				
			||||||
======================
 | 
					======================
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,22 +6,24 @@
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% if not page.is_root %}
 | 
					{% if not page.is_root %}
 | 
				
			||||||
<div class="field-row privacy-indicator {% if is_public %}public{% else %}private{% endif %}">
 | 
					<div class="privacy-indicator {% if is_public %}public{% else %}private{% endif %}">
 | 
				
			||||||
    <p>
 | 
					    <fieldset>
 | 
				
			||||||
        {% trans "Current status:" %}
 | 
					        <p>
 | 
				
			||||||
 | 
					            {% trans "Current status:" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <span class="label-public icon icon-view" aria-label="{% trans 'Page privacy. Current status: Public' %}">
 | 
					            <span class="label-public icon icon-view" aria-label="{% trans 'Page privacy. Current status: Public' %}">
 | 
				
			||||||
             {% trans "Public" %}
 | 
					                {% trans "Public" %}
 | 
				
			||||||
        </span>
 | 
					            </span>
 | 
				
			||||||
        <span class="label-private icon icon-no-view" aria-label="{% trans 'Page privacy. Current status: Private' %}">
 | 
					            <span class="label-private icon icon-no-view" aria-label="{% trans 'Page privacy. Current status: Private' %}">
 | 
				
			||||||
            {% trans "Private" %}
 | 
					                {% trans "Private" %}
 | 
				
			||||||
        </span>
 | 
					            </span>
 | 
				
			||||||
    </p>
 | 
					        </p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% if page.id and page_perms.can_set_view_restrictions %}
 | 
					        {% if page.id and page_perms.can_set_view_restrictions %}
 | 
				
			||||||
        <button data-url="{% url 'wagtailadmin_pages:set_privacy' page.id %}" class="button action-set-privacy">
 | 
					            <button data-url="{% url 'wagtailadmin_pages:set_privacy' page.id %}" class="button action-set-privacy">
 | 
				
			||||||
            {% trans "Set page privacy" %}
 | 
					                {% trans "Set page privacy" %}
 | 
				
			||||||
        </button>
 | 
					            </button>
 | 
				
			||||||
    {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
 | 
					    </fieldset>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
{% endif %}
 | 
					{% endif %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -349,8 +349,8 @@ class TestPrivacyIndicators(TestCase, WagtailTestUtils):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Check the privacy indicator is public
 | 
					        # Check the privacy indicator is public
 | 
				
			||||||
        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
					        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
				
			||||||
        self.assertContains(response, '<div class="field-row privacy-indicator public">')
 | 
					        self.assertContains(response, '<div class="privacy-indicator public">')
 | 
				
			||||||
        self.assertNotContains(response, '<div class="field-row privacy-indicator private">')
 | 
					        self.assertNotContains(response, '<div class="privacy-indicator private">')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_edit_private(self):
 | 
					    def test_edit_private(self):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
| 
						 | 
					@ -363,8 +363,8 @@ class TestPrivacyIndicators(TestCase, WagtailTestUtils):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Check the privacy indicator is public
 | 
					        # Check the privacy indicator is public
 | 
				
			||||||
        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
					        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
				
			||||||
        self.assertContains(response, '<div class="field-row privacy-indicator private">')
 | 
					        self.assertContains(response, '<div class="privacy-indicator private">')
 | 
				
			||||||
        self.assertNotContains(response, '<div class="field-row privacy-indicator public">')
 | 
					        self.assertNotContains(response, '<div class="privacy-indicator public">')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_edit_private_child(self):
 | 
					    def test_edit_private_child(self):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
| 
						 | 
					@ -377,5 +377,5 @@ class TestPrivacyIndicators(TestCase, WagtailTestUtils):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Check the privacy indicator is public
 | 
					        # Check the privacy indicator is public
 | 
				
			||||||
        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
					        self.assertTemplateUsed(response, 'wagtailadmin/pages/privacy_switch_panel.html')
 | 
				
			||||||
        self.assertContains(response, '<div class="field-row privacy-indicator private">')
 | 
					        self.assertContains(response, '<div class="privacy-indicator private">')
 | 
				
			||||||
        self.assertNotContains(response, '<div class="field-row privacy-indicator public">')
 | 
					        self.assertNotContains(response, '<div class="privacy-indicator public">')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue