Skip to content

Commit

Permalink
Merge pull request #574 from castlecms/bd/master-fix-back-to-site-setup
Browse files Browse the repository at this point in the history
Bd/master fix back to site setup
  • Loading branch information
bduncan137 authored Nov 13, 2023
2 parents b6ef93f + 43de4cd commit abd7a0d
Show file tree
Hide file tree
Showing 31 changed files with 3,286 additions and 105 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog
- Fix data-tiles that don't exist from rendering and spamming output
(for dexterity type definitions in control panel in /@@dexterity-types/<DexterityTypeHere>)
- Allow resuming importjson script
- fix missing/ inconsistently localed back to site setup button in controlpanels

3.0.0b126 (2023-08-01)
----------------------
Expand Down
12 changes: 12 additions & 0 deletions castle/cms/browser/controlpanel/documentviewer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from collective.documentviewer.browser.controlpanel import GlobalSettingsForm
from plone.app.z3cform.layout import wrap_form
from zope.browserpage.viewpagetemplatefile import ViewPageTemplateFile


class CastleDocumentViewerSettingsForm(GlobalSettingsForm):
template = ViewPageTemplateFile('templates/documentviewer.pt')
label = None
description=None


GlobalSettingsFormView = wrap_form(CastleDocumentViewerSettingsForm)
4 changes: 1 addition & 3 deletions castle/cms/browser/controlpanel/templates/announcements.pt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
<metal:main metal:fill-slot="prefs_configlet_main">

<a
href=""
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate=""
>
Site Setup
</a>
Expand Down
11 changes: 6 additions & 5 deletions castle/cms/browser/controlpanel/templates/archives-manage.pt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading"
i18n:translate="">Archive Management</h1>

Expand Down
11 changes: 6 additions & 5 deletions castle/cms/browser/controlpanel/templates/archives-review.pt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading"
i18n:translate="">Archive Management</h1>

Expand Down
13 changes: 6 additions & 7 deletions castle/cms/browser/controlpanel/templates/audit.pt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
tal:define="connected view/can_connect_to_index;
site_path python: '/'.join(context.getPhysicalPath())">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate=""
tal:condition="not: view/user">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
tal:condition="not: view/user">
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
11 changes: 6 additions & 5 deletions castle/cms/browser/controlpanel/templates/celery.pt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading"
i18n:translate="">Celery Tasks</h1>

Expand Down
11 changes: 5 additions & 6 deletions castle/cms/browser/controlpanel/templates/crawler.pt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

<div metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
28 changes: 28 additions & 0 deletions castle/cms/browser/controlpanel/templates/documentviewer.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone.z3cform"
metal:use-macro="context/@@standard_macros/page"
>

<body metal:fill-slot="body">
<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Portal status message
</div>

<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading">Global Document Viewer Settings</h1>

<metal:block use-macro="context/@@ploneform-macros/titlelessform" />

</body>

</html>
11 changes: 5 additions & 6 deletions castle/cms/browser/controlpanel/templates/links.pt
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@

<metal:main metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
11 changes: 5 additions & 6 deletions castle/cms/browser/controlpanel/templates/sessions.pt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

<metal:main metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
9 changes: 4 additions & 5 deletions castle/cms/browser/controlpanel/templates/social.pt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@

<div metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
10 changes: 4 additions & 6 deletions castle/cms/browser/controlpanel/templates/status.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
<body>
<metal:main metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>



<h1 class="documentFirstHeading">CastleCMS Status</h1>
<p class="discreet">
Displays the status of components and subprocesses used by CastleCMS
Expand Down
9 changes: 5 additions & 4 deletions castle/cms/browser/controlpanel/templates/subscribers.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
<body>
<metal:main metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<div tal:content="python: view.get_page(1)">
</div>

Expand Down
12 changes: 6 additions & 6 deletions castle/cms/browser/controlpanel/templates/survey.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<body>

<div metal:fill-slot="prefs_configlet_main">
<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
Site Setup
</a> &rsaquo;
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

Expand Down
11 changes: 5 additions & 6 deletions castle/cms/browser/controlpanel/templates/tags.pt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
<body>
<metal:main metal:fill-slot="prefs_configlet_main">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/plone_control_panel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>


<h1 class="documentFirstHeading" tal:content="view/label">View Title</h1>

<div metal:use-macro="context/global_statusmessage/macros/portal_message">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

<article id="content">

<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading"
Expand Down
7 changes: 7 additions & 0 deletions castle/cms/browser/templates/redirects-controlpanel.pt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
</dd>
</dl>

<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 i18n:translate="heading_add_aliases">Manage aliases</h1>

<form tal:attributes="action view/view_url" method="post">
Expand Down
15 changes: 12 additions & 3 deletions castle/cms/browser/templates/types-listing.pt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@
</span>
</div>

<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
</a>

<h1 class="documentFirstHeading">Dexterity Content Types</h1>

<p class="crud-description documentDescription"
tal:condition="view/description"
tal:content="structure view/description">
</p>
tal:condition="view/description"
tal:content="structure view/description"
></p>

<a class="pat-plone-modal"
href="${context/absolute_url}/@@add-clone-type">
Expand Down
5 changes: 3 additions & 2 deletions castle/cms/browser/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ class TypesListing(types.TypesListing):

# Create a form wrapper so the form gets layout.
TypesListingPage = layout.wrap_form(
TypesListing, __wrapper_class=types.TypesEditFormWrapper,
label=_(u'Dexterity Content Types'))
TypesListing,
__wrapper_class=types.TypesEditFormWrapper,
)
Loading

0 comments on commit abd7a0d

Please sign in to comment.