aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-02 15:24:04 +0100
committerSem <sembrestels@riseup.net>2011-11-02 15:24:04 +0100
commit60d0fea854a54f4647e5cc89a41dd7148e4cd7c2 (patch)
tree8ac2be46b83f3ed49f0cce20ed2c1c6cd48c4b5e /mod
parent9fa1a7b0b1dd363d16784707bcbb9c3e7c85966f (diff)
downloadelgg-60d0fea854a54f4647e5cc89a41dd7148e4cd7c2.tar.gz
elgg-60d0fea854a54f4647e5cc89a41dd7148e4cd7c2.tar.bz2
Fixes #3867. Rewrite and style unvalidated users administration area.
Diffstat (limited to 'mod')
-rw-r--r--mod/uservalidationbyemail/start.php1
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php2
-rw-r--r--mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php25
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php7
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php8
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php2
6 files changed, 30 insertions, 15 deletions
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index d3d0c3488..037f863a9 100644
--- a/mod/uservalidationbyemail/start.php
+++ b/mod/uservalidationbyemail/start.php
@@ -41,6 +41,7 @@ function uservalidationbyemail_init() {
// admin interface to manually validate users
elgg_register_admin_menu_item('administer', 'unvalidated', 'users');
+ elgg_extend_view('css/admin', 'uservalidationbyemail/css');
elgg_extend_view('js/elgg', 'uservalidationbyemail/js');
$action_path = dirname(__FILE__) . '/actions';
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index 8b72126ef..abe539108 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -4,6 +4,6 @@
*/
echo elgg_view_form('uservalidationbyemail/bulk_action', array(
- 'name' => 'unvalidated-users',
+ 'id' => 'unvalidated-users',
'action' => 'action/uservalidationbyemail/bulk_action'
));
diff --git a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
index 0e1461058..bc4d33c6a 100644
--- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -46,8 +46,6 @@ $pagination = elgg_view('navigation/pagination',array(
'limit' => $limit,
));
-echo $pagination;
-
$bulk_actions_checkbox = '<label><input type="checkbox" class="unvalidated-users-checkall" />'
. elgg_echo('uservalidationbyemail:check_all') . '</label>';
@@ -79,8 +77,8 @@ $delete = elgg_view('output/url', array(
));
$bulk_actions = <<<___END
-<div class="uvbe_bulk_actions">
- <div class="uvbe_admin_controls">
+<div class="uvbe_bulk_actions pas">
+ <div class="uvbe_admin_controls right">
$resend_email | $validate | $delete
</div>
@@ -90,15 +88,24 @@ ___END;
//$bulk_actions = elgg_view('page_elements/contentwrapper', array('body' => $bulk_actions));
-echo $bulk_actions;
-
-
+$list = '';
foreach ($users as $user) {
- echo elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user));
+ $list .= elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user));
}
+echo <<<___END
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ $bulk_actions
+ </div>
+ <div class="elgg-body">
+ $list
+ </div>
+</div>
+___END;
+
if ($count > 5) {
echo $bulk_actions;
}
-echo $pagination; \ No newline at end of file
+echo $pagination;
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
new file mode 100644
index 000000000..11f1aa18b
--- /dev/null
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
@@ -0,0 +1,7 @@
+.elgg-head .uvbe_bulk_actions label, .elgg-head .uvbe_bulk_actions a{
+ color: white;
+}
+
+.right {
+ float: right;
+}
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
index 50c98406e..35f1ada7f 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
@@ -3,12 +3,12 @@ elgg.provide('elgg.uservalidationbyemail');
elgg.uservalidationbyemail.init = function() {
$('.unvalidated-users-checkall').click(function() {
- checked = $(this).attr('checked');
- $('form[name=unvalidated-users]').find('input[type=checkbox]').attr('checked', checked);
+ checked = $(this).attr('checked') == 'checked';
+ $('form#unvalidated-users').find('input[type=checkbox]').attr('checked', checked);
});
$('.unvalidated-users-bulk-post').click(function(event) {
- $form = $('form[name=unvalidated-users]');
+ $form = $('form#unvalidated-users');
event.preventDefault();
// check if there are selected users
@@ -23,6 +23,6 @@ elgg.uservalidationbyemail.init = function() {
$form.attr('action', $(this).attr('href')).submit();
});
-};
+}
elgg.register_hook_handler('init', 'system', elgg.uservalidationbyemail.init);
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
index 209dbe02b..9d2f47139 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
@@ -13,7 +13,7 @@ $user = elgg_extract('user', $vars);
// 'name' => 'user_guids',
// 'options' => array("$user->username - \"$user->name\" &lt;$user->email&gt;" => $user->guid)
//));
-$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"elgg-input-checkboxes\" name=\"user_guids[]\">"
+$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"elgg-input-checkboxes\" name=\"user_guids[]\" />"
. "$user->username - \"$user->name\" &lt;$user->email&gt;</label>";
$created = elgg_echo('uservalidationbyemail:admin:user_created', array(elgg_view_friendly_time($user->time_created)));