kopia lustrzana https://github.com/wagtail/wagtail
Revert "Add legacy and new status tags to the pattern library" #8665
This reverts commit daa47baddd
.
Resolves #8798
pull/8801/head
rodzic
c0fc2c984e
commit
6b4a551c0b
|
@ -50,7 +50,6 @@ Changelog
|
|||
* Deprecate the usage and documentation of the `wagtail.contrib.modeladmin.menus.SubMenu` class, provide a warning if used directing developers to use `wagtail.admin.menu.Menu` instead (Matt Westcott)
|
||||
* Remove legacy (non-next) breadcrumbs no longer used, remove `ModelAdmin` usage of breadcrumbs completely (Paarth Agarwal)
|
||||
* Replace human-readable-date hover pattern with accessible tooltip variant across all of admin (Bernd de Ridder)
|
||||
* Add legacy and new status tags to the pattern library (Steven Steinwand)
|
||||
* Added `WAGTAILADMIN_USER_PASSWORD_RESET_FORM` setting for overriding the admin password reset form (Michael Karamuth)
|
||||
* Prefetch workflow states in edit page view to to avoid queries in other parts of the view/templates that need it (Tidiane Dia)
|
||||
* Remove the edit link from edit bird in previews to avoid confusion (Sævar Öfjörð Magnússon)
|
||||
|
|
|
@ -57,7 +57,6 @@ When using a queryset to render a list of images, you can now use the `prefetch_
|
|||
* Deprecate the usage and documentation of the `wagtail.contrib.modeladmin.menus.SubMenu` class, provide a warning if used directing developers to use `wagtail.admin.menu.Menu` instead (Matt Westcott)
|
||||
* Remove legacy (non-next) breadcrumbs no longer used, remove `ModelAdmin` usage of breadcrumbs completely (Paarth Agarwal)
|
||||
* Replace human-readable-date hover pattern with accessible tooltip variant across all of admin (Bernd de Ridder)
|
||||
* Add legacy and new status tags to the pattern library (Steven Steinwand)
|
||||
* Added `WAGTAILADMIN_USER_PASSWORD_RESET_FORM` setting for overriding the admin password reset form (Michael Karamuth)
|
||||
* Prefetch workflow states in edit page view to to avoid queries in other parts of the view/templates that need it (Tidiane Dia)
|
||||
* Remove the edit link from edit bird in previews to avoid confusion (Sævar Öfjörð Magnússon)
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{% load i18n %}
|
||||
{% comment "text/markdown" %}
|
||||
Variables this template accepts:
|
||||
|
||||
`page` - A wagtail page object
|
||||
{% endcomment %}
|
||||
{% if page.live %}
|
||||
{% with page_url=page.url %}
|
||||
{% if page_url is not None %}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
import React from 'react';
|
||||
import { Pattern, generateDocs } from 'storybook-django/src/react';
|
||||
|
||||
import template from './page_status_tag.html';
|
||||
|
||||
const { docs, argTypes } = generateDocs(template);
|
||||
|
||||
export default {
|
||||
parameters: { docs },
|
||||
argTypes: {
|
||||
...argTypes,
|
||||
url: {
|
||||
options: [null, 'https://wagtail.io'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const Template = (args) => (
|
||||
<Pattern filename={__filename} context={{ page: args }} />
|
||||
);
|
||||
export const Live = Template.bind({});
|
||||
|
||||
Live.args = {
|
||||
live: true,
|
||||
status_string: 'live',
|
||||
url: null,
|
||||
};
|
||||
|
||||
export const Draft = Template.bind({});
|
||||
|
||||
Draft.args = {
|
||||
live: false,
|
||||
status_string: 'draft',
|
||||
};
|
|
@ -4,6 +4,7 @@
|
|||
Variables accepted by this template:
|
||||
|
||||
- `page` - A wagtail page object
|
||||
- `classes` - String of extra css classes to pass to this component
|
||||
{% endcomment %}
|
||||
|
||||
{% if page.live and page.url is not None %}
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
import React from 'react';
|
||||
import { Pattern, generateDocs } from 'storybook-django/src/react';
|
||||
|
||||
import template from './page_status_tag_new.html';
|
||||
|
||||
const { docs, argTypes } = generateDocs(template);
|
||||
|
||||
export default {
|
||||
parameters: { docs },
|
||||
argTypes: { ...argTypes },
|
||||
};
|
||||
|
||||
const PublicTemplate = (args) => (
|
||||
<Pattern
|
||||
filename={__filename}
|
||||
tags={{
|
||||
test_page_is_public: {
|
||||
'page as is_public': {
|
||||
raw: false,
|
||||
},
|
||||
},
|
||||
}}
|
||||
context={{ page: args }}
|
||||
/>
|
||||
);
|
||||
|
||||
export const Public = PublicTemplate.bind({});
|
||||
Public.args = {
|
||||
live: true,
|
||||
url: '#',
|
||||
};
|
||||
|
||||
const PrivateTemplate = (args) => (
|
||||
<Pattern
|
||||
filename={__filename}
|
||||
tags={{
|
||||
test_page_is_public: {
|
||||
'page as is_public': {
|
||||
raw: true,
|
||||
},
|
||||
},
|
||||
}}
|
||||
context={{ page: args }}
|
||||
/>
|
||||
);
|
||||
|
||||
export const Private = PrivateTemplate.bind({});
|
||||
Private.args = {
|
||||
live: true,
|
||||
url: '#',
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
from pattern_library.monkey_utils import override_tag
|
||||
|
||||
from wagtail.admin.templatetags.wagtailadmin_tags import register
|
||||
|
||||
override_tag(register, name="test_page_is_public")
|
Ładowanie…
Reference in New Issue