aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/uservalidationbyemail/views')
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php2
-rw-r--r--mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php44
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php14
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php10
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php22
5 files changed, 60 insertions, 32 deletions
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..036336734 100644
--- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -46,16 +46,14 @@ $pagination = elgg_view('navigation/pagination',array(
'limit' => $limit,
));
-echo $pagination;
-
-$bulk_actions_checkbox = '<label><input type="checkbox" class="unvalidated-users-checkall" />'
+$bulk_actions_checkbox = '<label><input type="checkbox" class="uservalidationbyemail-unvalidated-users-checkall" />'
. elgg_echo('uservalidationbyemail:check_all') . '</label>';
$validate = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/validate/',
'text' => elgg_echo('uservalidationbyemail:admin:validate'),
'title' => elgg_echo('uservalidationbyemail:confirm_validate_checked'),
- 'class' => 'unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
'is_action' => true,
'is_trusted' => true,
));
@@ -64,7 +62,7 @@ $resend_email = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/resend_validation/',
'text' => elgg_echo('uservalidationbyemail:admin:resend_validation'),
'title' => elgg_echo('uservalidationbyemail:confirm_resend_validation_checked'),
- 'class' => 'unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
'is_action' => true,
'is_trusted' => true,
));
@@ -73,16 +71,16 @@ $delete = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/delete/',
'text' => elgg_echo('uservalidationbyemail:admin:delete'),
'title' => elgg_echo('uservalidationbyemail:confirm_delete_checked'),
- 'class' => 'unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
'is_action' => true,
'is_trusted' => true,
));
$bulk_actions = <<<___END
-<div class="uvbe_bulk_actions">
- <div class="uvbe_admin_controls">
- $resend_email | $validate | $delete
- </div>
+<div class="uservalidationbyemail-bulk-actions pas">
+ <ul class="uservalidationbyemail-controls right">
+ <li>$resend_email</li><li>$validate</li><li>$delete</li>
+ </ul>
$bulk_actions_checkbox
</div>
@@ -90,15 +88,29 @@ ___END;
//$bulk_actions = elgg_view('page_elements/contentwrapper', array('body' => $bulk_actions));
-echo $bulk_actions;
-
-
-foreach ($users as $user) {
- echo elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user));
+if (is_array($users) && count($users) > 0) {
+ $html = '<ul class="elgg-list uservalidationbyemail-unvalidated-user-list">';
+ foreach ($users as $user) {
+ $html .= "<li id=\"unvalidated-user-{$user->guid}\" class=\"elgg-item uservalidationbyemail-unvalidated-user-item\">";
+ $html .= elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user));
+ $html .= '</li>';
+ }
+ $html .= '</ul>';
}
+echo <<<___END
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ $bulk_actions
+ </div>
+ <div class="elgg-body">
+ $html
+ </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..3ce9a8ac9
--- /dev/null
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
@@ -0,0 +1,14 @@
+.elgg-head .uservalidationbyemail-bulk-actions label, .elgg-head .uservalidationbyemail-bulk-actions a{
+ color: white;
+}
+
+.uservalidationbyemail-controls li {
+ display: inline;
+ border-right: solid 1px;
+ padding: 0 4px 0 4px;
+}
+
+.uservalidationbyemail-controls li:last-child {
+ border: 0;
+ padding-right: 0;
+}
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
index 50c98406e..a10d7fbe6 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
@@ -2,13 +2,13 @@
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);
+ $('.uservalidationbyemail-unvalidated-users-checkall').click(function() {
+ 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]');
+ $('.uservalidationbyemail-unvalidated-users-bulk-post').click(function(event) {
+ $form = $('form#unvalidated-users');
event.preventDefault();
// check if there are selected users
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
index 209dbe02b..6431712ce 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)));
@@ -36,16 +36,18 @@ $delete = elgg_view('output/confirmlink', array(
'text' => elgg_echo('uservalidationbyemail:admin:delete')
));
-?>
+$block = <<<___END
+<div class="admin-settings radius8 pas baa">
+ $checkbox<br />
-<div class="admin_settings radius8 pas baa">
- <?php echo $checkbox; ?><br />
+ <ul class="uservalidationbyemail-controls right">
+ <li>$resend_email</li><li>$validate</li><li>$delete</li>
+ </ul>
- <div class="uservalidationbyemail_unvalidated_controls right">
- <?php echo "$resend_email | $validate | $delete"; ?>
- </div>
-
- <div class="uservalidationbyemail_unvalidated_user_details mll small">
- <?php echo $created; ?>
+ <div class="uservalidationbyemail-unvalidated-user-details mll small">
+ $created
</div>
</div>
+___END;
+
+echo elgg_view_image_block('', $block);