From dbeb76f57aab441e5e93dcb1919b0b442c889965 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Oct 2011 14:42:59 -0700 Subject: Add the ability to close user registration. --- src/views/pages/users/new-locked.html.php | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/views/pages/users/new-locked.html.php (limited to 'src/views') diff --git a/src/views/pages/users/new-locked.html.php b/src/views/pages/users/new-locked.html.php new file mode 100644 index 0000000..dc7ad0d --- /dev/null +++ b/src/views/pages/users/new-locked.html.php @@ -0,0 +1,9 @@ +status('403 Forbidden'); +$t->header('Create new user'); + +$t->paragraph("Sorry, new user registration is disabled."); + +$t->footer(); -- cgit v1.2.3-2-g168b From 9e4c1efb467014ce69886a31168b4adb3c8a8850 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Oct 2011 23:28:32 -0400 Subject: Add some (S)CSS for printing. --- src/views/Template.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/Template.class.php b/src/views/Template.class.php index 663ec05..bf57e93 100644 --- a/src/views/Template.class.php +++ b/src/views/Template.class.php @@ -138,7 +138,7 @@ class Template { $str.= $this->tag('title', array(), htmlspecialchars($title)); $str.= $this->css('style.css', 'all'); $str.= $this->css('screen.css', 'screen'); - $str.= $this->css('logo-style.css', 'screen'); + $str.= $this->css('print.css', 'print'); $str.= $this->closeTag('head'); $body_class = 'logged'.($logged_in?'in':'out'); -- cgit v1.2.3-2-g168b From f15e53890dc93bfbf710e07a510208ea39774d0a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Oct 2011 23:29:08 -0400 Subject: Change the title on user pages from "Users: NAME" to "User: NAME". --- src/views/pages/users/individual.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/pages/users/individual.html.php b/src/views/pages/users/individual.html.php index 5722977..c630515 100644 --- a/src/views/pages/users/individual.html.php +++ b/src/views/pages/users/individual.html.php @@ -57,7 +57,7 @@ function inputField($user, $arr) { //////////////////////////////////////////////////////////////////////////////// $username = $user->getName(); -$t->header("Users: $username"); +$t->header("User: $username"); $t->tag('h1', array(), ($user->canEdit()?'Edit':'View')." User $username (UID: ".$user->getUID().")"); -- cgit v1.2.3-2-g168b From 2a71bacfc5536279bbc5e238fb6a07c03e85d12d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 5 Oct 2011 00:18:51 -0400 Subject: Edit individual.html to allow showing multiple users at once. Add a hack to the Users.class controller to show all users for the "all" username. Mark "all" as forbiddent in the Auth.class model. --- src/views/pages/users/individual.html.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/views') diff --git a/src/views/pages/users/individual.html.php b/src/views/pages/users/individual.html.php index c630515..39360b7 100644 --- a/src/views/pages/users/individual.html.php +++ b/src/views/pages/users/individual.html.php @@ -1,6 +1,7 @@ 1) { + $t->header("Users: $username"); +} else { + $t->header("User: $username"); +} + +foreach($users as $user) { $username = $user->getName(); -$t->header("User: $username"); $t->tag('h1', array(), ($user->canEdit()?'Edit':'View')." User $username (UID: ".$user->getUID().")"); @@ -136,4 +143,5 @@ if ($user->canEdit()) { $t->tag('input', array('type'=>'submit', 'value'=>'Save')); } $t->closeTag('form'); +} $t->footer(); -- cgit v1.2.3-2-g168b From f21d82c9eff383d2c1c45c94af5f6c355e3258b2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 9 Oct 2011 01:05:11 -0400 Subject: Properly use thead and tbody. --- src/views/pages/users/index.html.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'src/views') diff --git a/src/views/pages/users/index.html.php b/src/views/pages/users/index.html.php index 7f51592..caedf5c 100644 --- a/src/views/pages/users/index.html.php +++ b/src/views/pages/users/index.html.php @@ -13,14 +13,27 @@ $t->openTag('form', array('action'=>$t->url('users/index'), $t->tag('input', array('type'=>'submit', 'value'=>'Save/Update')); -$t->openTag('table'); +$t->openTag('table', array('class'=>'sortable', 'id'=>'bar')); +$t->openTag('thead'); $t->openTag('tr'); foreach ($attribs as $attrib) { $t->tag('th', array(), $attrib['name']); } -$t->tag('th'); +$t->tag('th', array(), '-'); $t->closeTag('tr'); +$t->closeTag('thead'); + +$t->openTag('tfoot'); +$t->openTag('tr'); +foreach ($attribs as $attrib) { + $t->tag('th', array(), $attrib['name']); +} +$t->tag('th', array(), '-'); +$t->closeTag('tr'); +$t->closeTag('tfoot'); + +$t->openTag('tbody'); foreach ($users as $user) { $t->openTag('tr'); @@ -48,6 +61,7 @@ foreach ($users as $user) { $arr['value'] = 'true'; $arr['type'] = 'checkbox'; } else { + $t->tag('span', array('class'=>'cell_width'), $value); $arr['value'] = $value; $arr['type'] = 'text'; } @@ -66,13 +80,7 @@ foreach ($users as $user) { $t->closeTag('tr'); } -$t->openTag('tr'); -foreach ($attribs as $attrib) { - $t->tag('th', array(), $attrib['name']); -} -$t->tag('th'); -$t->closeTag('tr'); - +$t->closeTag('tbody'); $t->closeTag('table'); $t->tag('input', array('type'=>'submit', -- cgit v1.2.3-2-g168b