Skip to content

Commit

Permalink
Added help_requested, public_history and public_source to site settin…
Browse files Browse the repository at this point in the history
…g page
  • Loading branch information
Arpita-Jaiswal authored and amitu committed Sep 19, 2024
1 parent b6eef92 commit 76f33c2
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 2 deletions.
36 changes: 36 additions & 0 deletions actions/sites/settings/basic.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ js: $assets.files.assets.functions.js
callAlert("renaming privacy: " + site_slug + ", is_public: " + is_public)



-- optional string update-editable-error:

-- void update-editable(site_slug, is_editable):
Expand All @@ -40,6 +41,41 @@ js: $assets.files.assets.functions.js
callAlert("update-editable: " + site_slug + ", is_editable: " + is_editable)



-- optional string update-help-requested-error:

-- void update-help-requested(site_slug, help_requested):
string site_slug:
boolean help_requested:
js: $assets.files.assets.functions.js

callAlert("update-help-requested: " + site_slug + ", help_requested: " + help_requested)




-- optional string update-public-history-error:

-- void update-public-history(site_slug, public_history):
string site_slug:
boolean public_history:
js: $assets.files.assets.functions.js

callAlert("update-public-history: " + site_slug + ", public_history: " + public_history)



-- optional string update-public-source-error:

-- void update-public-source(site_slug, public_source):
string site_slug:
boolean public_source:
js: $assets.files.assets.functions.js

callAlert("update-public-source: " + site_slug + ", public_source: " + public_source)



-- optional string mark-package-error:

-- void mark-package(site_slug, is_package):
Expand Down
110 changes: 108 additions & 2 deletions pages/sites/setting/index.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,114 @@ dashboard-url: $page.dashboard-url
width: wide
radius: curved
$on-click$: $page.setting-actions.update-editable(site_slug=$page.site.site-slug, is_editable=true)




;; ------------------------------- help-requested -----------------------------------------------
-- ds.heading-medium: Site: Help Requested Enabled
if: { page.site.help-requested }

-- ds.copy-regular:
if: { page.site.help-requested }

By default sites on FifthTry disables **help requested** but you, or someone in your team, enabled help-requested
on this site. This means that you have given permission to FifthTry staff members to view the history of this
site, view the source of this site and can edit the content of the site.

-- ds.danger-button: Disable Help Requested
if: { page.site.help-requested }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-help-requested(site_slug=$page.site.site-slug, help_requested=false)



-- ds.heading-medium: Site: Help Requested Disabled
if: { !page.site.help-requested }

-- ds.copy-regular:
if: { !page.site.help-requested }

The site disabled **help requested**. You would enable help-requested to the site if you plan to give permission
to FifthTry staff members to view the history of this site, view the source of this site and can edit the
content of the site.


-- ds.danger-button: Enable Help Requested
if: { !page.site.help-requested }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-help-requested(site_slug=$page.site.site-slug, help_requested=true)

;; ------------------------------- public-history -----------------------------------------------
-- ds.heading-medium: Site: Public History Enabled
if: { page.site.public-history }

-- ds.copy-regular:
if: { page.site.public-history }

By default sites on FifthTry disables **public history** but you, or someone in your team, enabled public-history
on this site. This means that you have given permission to everyone to view the history of this site.

-- ds.danger-button: Disable Public History
if: { page.site.public-history }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-public-history(site_slug=$page.site.site-slug, public_history=false)



-- ds.heading-medium: Site: Public History Disabled
if: { !page.site.public-history }

-- ds.copy-regular:
if: { !page.site.public-history }

The site disabled **public history**. You would enable public-history to the site if you plan to give permission
to everyone to view the history of this site.


-- ds.danger-button: Enable Public History
if: { !page.site.public-history }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-public-history(site_slug=$page.site.site-slug, public_history=true)


;; ------------------------------- public-source -----------------------------------------------
-- ds.heading-medium: Site: Public Source Enabled
if: { page.site.public-source }

-- ds.copy-regular:
if: { page.site.public-source }

By default sites on FifthTry disables **public source** but you, or someone in your team, enabled public-source
on this site. This means that you have given permission to everyone to view the source of this site but they
cannot edit the content of the site.

-- ds.danger-button: Disable Public Source
if: { page.site.public-source }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-public-source(site_slug=$page.site.site-slug, public_source=false)



-- ds.heading-medium: Site: Public Source Disabled
if: { !page.site.public-source }

-- ds.copy-regular:
if: { !page.site.public-source }

The site disabled **public source**. You would enable public-source to the site if you plan to give permission
to everyone to view the source of this site but they cannot edit the content of the site.


-- ds.danger-button: Enable Public Source
if: { !page.site.public-source }
width: wide
radius: curved
$on-click$: $page.setting-actions.update-public-source(site_slug=$page.site.site-slug, public_source=true)

;; ------------------------------- is-package -----------------------------------------------
;;
;; TODO: move this to a separate page, maybe "Developer Settings"
Expand Down
3 changes: 3 additions & 0 deletions records/sites.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ optional string zip-download-url:
boolean is-public:
boolean is-package:
boolean is-editable:
boolean help-requested:
boolean public-history:
boolean public-source:



Expand Down

0 comments on commit 76f33c2

Please sign in to comment.