aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/views/default
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 10:27:53 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 10:27:53 +0000
commitfe236ea096f092f38ea4d3517fd25fd084d28c6f (patch)
tree4210535cd663daaef81aa9186ec2de5866ad33f2 /mod/sitepages/views/default
parent3b970491b7bc84e8f7408b5858e49b75ae7a7d6c (diff)
downloadelgg-fe236ea096f092f38ea4d3517fd25fd084d28c6f.tar.gz
elgg-fe236ea096f092f38ea4d3517fd25fd084d28c6f.tar.bz2
a simple version of the sitepages index - we will need to turn this into a basic and advance selection for admins.
git-svn-id: http://code.elgg.org/elgg/trunk@6153 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/views/default')
-rw-r--r--mod/sitepages/views/default/canvas/layouts/frontpage.php17
-rw-r--r--mod/sitepages/views/default/sitepages/css.php7
-rw-r--r--mod/sitepages/views/default/sitepages/forms/editfrontsimple.php61
-rw-r--r--mod/sitepages/views/default/sitepages/members.php9
-rw-r--r--mod/sitepages/views/default/sitepages/sidebar.php13
-rw-r--r--mod/sitepages/views/default/sitepages/welcome.php13
6 files changed, 120 insertions, 0 deletions
diff --git a/mod/sitepages/views/default/canvas/layouts/frontpage.php b/mod/sitepages/views/default/canvas/layouts/frontpage.php
new file mode 100644
index 000000000..04ae75504
--- /dev/null
+++ b/mod/sitepages/views/default/canvas/layouts/frontpage.php
@@ -0,0 +1,17 @@
+<?php
+
+?>
+<div id="elgg_content" class="clearfloat">
+ <div id="elgg_sidebar" class="frontpage">
+ <?php
+ if (isset($vars['area2'])) echo $vars['area2'];
+ if (isset($vars['area3'])) echo $vars['area3'];
+ ?>
+ </div>
+
+ <div id="elgg_page_contents" class="frontpage clearfloat">
+ <?php
+ if (isset($vars['area1'])) echo $vars['area1'];
+ ?>
+ </div>
+</div>
diff --git a/mod/sitepages/views/default/sitepages/css.php b/mod/sitepages/views/default/sitepages/css.php
new file mode 100644
index 000000000..9a2b84166
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/css.php
@@ -0,0 +1,7 @@
+#elgg_sidebar.frontpage { /* elgg sidebar */
+ width:260px;
+}
+
+#elgg_page_contents.frontpage { /* main page contents */
+ width:680px;
+} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php b/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
new file mode 100644
index 000000000..89f4e5673
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/forms/editfrontsimple.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Edit form for the custom front page
+ *
+ * @package SitePages
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+$action = 'sitepages/addfrontsimple';
+
+if($sitepages_object = sitepages_get_sitepage_object('frontsimple')){
+ $welcometitle = $sitepages_object->welcometitle;
+ $welcomemessage = $sitepages_object->welcomemessage;
+ $sidebartitle = $sitepages_object->sidebartitle;
+ $sidebarmessage = $sitepages_object->sidebarmessage;
+}else{
+ $welcometitle = "";
+ $welcomemessage = "";
+ $sidebartitle = "";
+ $sidebarmessage = "";
+}
+
+
+// set the required form variables
+$welcometitle_form = elgg_view('input/text', array('internalname' => 'welcometitle', 'value' => $welcometitle));
+$welcomemessage_form = elgg_view('input/longtext', array('internalname' => 'welcomemessage', 'value' => $welcomemessage, 'class' => 'input_textarea monospace'));
+$sidebartitle_form = elgg_view('input/text', array('internalname' => 'sidebartitle', 'value' => $sidebartitle));
+$sidebarmessage_form = elgg_view('input/longtext', array('internalname' => 'sidebarmessage', 'value' => $sidebarmessage, 'class' => 'input_textarea monospace'));;
+$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+
+$welcomemessage_title = elgg_echo("sitepages:welcomemessage");
+$sidebarmessage_title = elgg_echo("sitepages:sidebarmessage");
+$welcometitle_title = elgg_echo("sitepages:welcometitle");
+$sidebartitle_title = elgg_echo("sitepages:sidebartitle");
+$welcome_intro = elgg_echo("sitepages:welcomeintro");
+$sidebar_intro = elgg_echo("sitepages:sidebarintro");
+
+//construct the form
+$form_body = <<<___EOT
+
+ <h2>$welcome_intro</h2>
+ <p><label>$welcometitle_title
+ $welcometitle_form</label></p>
+ <p><label>$welcomemessage_title
+ $welcomemessage_form</label></p>
+
+ <h2>$sidebar_intro</h2>
+ <p><label>$sidebartitle_title
+ $sidebartitle_form</label></p>
+ <p><label>$sidebarmessage_title
+ $sidebarmessage_form</label></p>
+
+ $hidden_guid
+ $submit_input
+
+___EOT;
+
+echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body)); \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/members.php b/mod/sitepages/views/default/sitepages/members.php
new file mode 100644
index 000000000..3559f493a
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/members.php
@@ -0,0 +1,9 @@
+<?php
+ $newest_members = $vars['members'];
+?>
+<h3><?php echo elgg_echo('riverdashboard:recentmembers') ?></h3>
+<?php
+ foreach($newest_members as $mem){
+ echo "<div class='entity_listing_icon'>" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'small')) . "</div>";
+ }
+?> \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/sidebar.php b/mod/sitepages/views/default/sitepages/sidebar.php
new file mode 100644
index 000000000..8ec177fd8
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/sidebar.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Admin welcome message
+ **/
+
+$sitepages_object = sitepages_get_sitepage_object('frontsimple');
+$sidebartitle = $sitepages_object->sidebartitle;
+$sidebarmessage = $sitepages_object->sidebarmessage;
+
+if($sidebarmessage){
+ echo "<h3>" . $sidebartitle . "</h3>";
+ echo $sidebarmessage;
+} \ No newline at end of file
diff --git a/mod/sitepages/views/default/sitepages/welcome.php b/mod/sitepages/views/default/sitepages/welcome.php
new file mode 100644
index 000000000..bf97eb81f
--- /dev/null
+++ b/mod/sitepages/views/default/sitepages/welcome.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Admin welcome message
+ **/
+
+$sitepages_object = sitepages_get_sitepage_object('frontsimple');
+$welcometitle = $sitepages_object->welcometitle;
+$welcomemessage = $sitepages_object->welcomemessage;
+
+if($welcomemessage){
+ echo "<h2>" . $welcometitle . "</h2>";
+ echo $welcomemessage;
+} \ No newline at end of file