diff --git a/Web/Models/Entities/Club.php b/Web/Models/Entities/Club.php index c6528503..9d3e1d2c 100644 --- a/Web/Models/Entities/Club.php +++ b/Web/Models/Entities/Club.php @@ -109,6 +109,11 @@ class Club extends RowModel { return $this->getRecord()->closed; } + + function getAdministratorsListDisplay(): int + { + return $this->getRecord()->administrators_list_display; + } function getType(): int { diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index c7ca3e22..1042172d 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -150,6 +150,7 @@ final class GroupPresenter extends OpenVKPresenter $club->setAbout(empty($this->postParam("about")) ? NULL : $this->postParam("about")); $club->setShortcode(empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode")); $club->setWall(empty($this->postParam("wall")) ? 0 : 1); + $club->setAdministrators_List_Display(empty($this->postParam("administrators_list_display")) ? 0 : $this->postParam("administrators_list_display")); if($_FILES["ava"]["error"] === UPLOAD_ERR_OK) { $photo = new Photo; diff --git a/Web/Presenters/templates/Group/Edit.xml b/Web/Presenters/templates/Group/Edit.xml index d82a0834..aaaeefee 100644 --- a/Web/Presenters/templates/Group/Edit.xml +++ b/Web/Presenters/templates/Group/Edit.xml @@ -69,6 +69,16 @@ canPost()}checked{/if}/> {_group_allow_post_for_everyone} + + + {_group_administrators_list}: + + + getAdministratorsListDisplay() == 0}checked{/if}/> {_group_display_only_creator}
+ getAdministratorsListDisplay() == 1}checked{/if}/> {_group_display_all_administrators}
+ getAdministratorsListDisplay() == 2}checked{/if}/> {_group_dont_display_administrators_list}
+ + diff --git a/Web/Presenters/templates/Group/View.xml b/Web/Presenters/templates/Group/View.xml index 49d56ff9..be33d6f4 100644 --- a/Web/Presenters/templates/Group/View.xml +++ b/Web/Presenters/templates/Group/View.xml @@ -105,19 +105,44 @@ {_"group_type_open"} -
-
- {_"creator"} + {if $club->getAdministratorsListDisplay() == 0} +
+
+ {_"creator"} +
+
+ {var author = $club->getOwner()} + +
-
- {var author = $club->getOwner()} - + {elseif $club->getAdministratorsListDisplay() == 1} +
+
+ {_"administrators"} +
+
+ {var author = $club->getOwner()} + +
-
+ {/if}
{_"albums"} diff --git a/install/sqls/00005-administrators-list.sql b/install/sqls/00005-administrators-list.sql new file mode 100644 index 00000000..199b83ba --- /dev/null +++ b/install/sqls/00005-administrators-list.sql @@ -0,0 +1 @@ +ALTER TABLE groups ADD COLUMN administrators_list_display TINYINT(3) UNSIGNED NOT NULL DEFAULT 0; diff --git a/locales b/locales index 12998df6..c3127e1a 160000 --- a/locales +++ b/locales @@ -1 +1 @@ -Subproject commit 12998df6df2a28489ba2e65a9f255af115eb83de +Subproject commit c3127e1af00fa19e88acdf1c8ce0ebe74a61d6d4