From fe236ea096f092f38ea4d3517fd25fd084d28c6f Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 24 May 2010 10:27:53 +0000 Subject: 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 --- .../views/default/canvas/layouts/frontpage.php | 17 ++++++ mod/sitepages/views/default/sitepages/css.php | 7 +++ .../default/sitepages/forms/editfrontsimple.php | 61 ++++++++++++++++++++++ mod/sitepages/views/default/sitepages/members.php | 9 ++++ mod/sitepages/views/default/sitepages/sidebar.php | 13 +++++ mod/sitepages/views/default/sitepages/welcome.php | 13 +++++ 6 files changed, 120 insertions(+) create mode 100644 mod/sitepages/views/default/canvas/layouts/frontpage.php create mode 100644 mod/sitepages/views/default/sitepages/css.php create mode 100644 mod/sitepages/views/default/sitepages/forms/editfrontsimple.php create mode 100644 mod/sitepages/views/default/sitepages/members.php create mode 100644 mod/sitepages/views/default/sitepages/sidebar.php create mode 100644 mod/sitepages/views/default/sitepages/welcome.php (limited to 'mod/sitepages/views/default') 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 @@ + +
+
+ +
+ +
+ +
+
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 @@ +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 + +

$welcome_intro

+

+

+ +

$sidebar_intro

+

+

+ + $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 @@ + +

+" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'small')) . ""; + } +?> \ 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 @@ +sidebartitle; +$sidebarmessage = $sitepages_object->sidebarmessage; + +if($sidebarmessage){ + echo "

" . $sidebartitle . "

"; + 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 @@ +welcometitle; +$welcomemessage = $sitepages_object->welcomemessage; + +if($welcomemessage){ + echo "

" . $welcometitle . "

"; + echo $welcomemessage; +} \ No newline at end of file -- cgit v1.2.3