aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages/views/default')
-rw-r--r--mod/pages/views/default/input/write_access.php35
-rw-r--r--mod/pages/views/default/object/page_top.php11
-rw-r--r--mod/pages/views/default/pages/group_module.php2
3 files changed, 45 insertions, 3 deletions
diff --git a/mod/pages/views/default/input/write_access.php b/mod/pages/views/default/input/write_access.php
new file mode 100644
index 000000000..69277ca20
--- /dev/null
+++ b/mod/pages/views/default/input/write_access.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Write access
+ *
+ * Removes the public option found in input/access
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['options_values']
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['entity'] Optional. The entity for this access control (uses write_access_id)
+ */
+
+$options = get_write_access_array();
+unset($options[ACCESS_PUBLIC]);
+
+$defaults = array(
+ 'class' => 'elgg-input-access',
+ 'disabled' => FALSE,
+ 'value' => get_default_access(),
+ 'options_values' => $options,
+);
+
+if (isset($vars['entity'])) {
+ $defaults['value'] = $vars['entity']->write_access_id;
+ unset($vars['entity']);
+}
+
+$vars = array_merge($defaults, $vars);
+
+if ($vars['value'] == ACCESS_DEFAULT) {
+ $vars['value'] = get_default_access();
+}
+$vars['value'] = ($vars['value'] == ACCESS_PUBLIC) ? ACCESS_LOGGED_IN : $vars['value'];
+
+echo elgg_view('input/dropdown', $vars);
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
index 756c542b4..2ad44e38c 100644
--- a/mod/pages/views/default/object/page_top.php
+++ b/mod/pages/views/default/object/page_top.php
@@ -18,6 +18,13 @@ if (!$page) {
return TRUE;
}
+// pages used to use Public for write access
+if ($page->write_access_id == ACCESS_PUBLIC) {
+ // this works because this metadata is public
+ $page->write_access_id = ACCESS_LOGGED_IN;
+}
+
+
if ($revision) {
$annotation = $revision;
} else {
@@ -75,7 +82,7 @@ if ($full) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$info = elgg_view_image_block($page_icon, $list_body);
@@ -96,7 +103,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($page_icon, $list_body);
}
diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php
index 6befb1c65..1d3437e18 100644
--- a/mod/pages/views/default/pages/group_module.php
+++ b/mod/pages/views/default/pages/group_module.php
@@ -13,7 +13,7 @@ if ($group->pages_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pages/group/$group->guid/owner",
+ 'href' => "pages/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
));