aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.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
-rw-r--r--views/default/css/admin.php83
7 files changed, 144 insertions, 32 deletions
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index 6904ce9e2..8de5d0522 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..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);
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index 160a2a3e4..61b61c27a 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -1002,6 +1002,89 @@ a.elgg-widget-collapsed:before {
}
/* ***************************************
+ HELPERS
+*************************************** */
+
+.clearfloat {
+ clear: both;
+}
+
+.hidden {
+ display: none;
+}
+
+.centered {
+ margin: 0 auto;
+}
+
+.center {
+ text-align: center;
+}
+
+.float {
+ float: left;
+}
+
+.float-alt {
+ float: right;
+}
+
+.right {
+ float: right;
+}
+
+.left {
+ float: left;
+}
+
+.link {
+ cursor: pointer;
+}
+
+.large {
+ font-size: 120%;
+}
+
+.small {
+ font-size: 80%;
+}
+
+.elgg-discover .elgg-discoverable {
+ display: none;
+}
+
+.elgg-discover:hover .elgg-discoverable {
+ display: block;
+}
+
+.elgg-transition:hover {
+ opacity: .7;
+}
+
+/* ***************************************
+ BORDERS AND SEPARATORS
+*************************************** */
+.elgg-border-plain {
+ border: 1px solid #eeeeee;
+}
+.elgg-border-transition {
+ border: 1px solid #eeeeee;
+}
+.elgg-divide-top {
+ border-top: 1px solid #CCCCCC;
+}
+.elgg-divide-bottom {
+ border-bottom: 1px solid #CCCCCC;
+}
+.elgg-divide-left {
+ border-left: 1px solid #CCCCCC;
+}
+.elgg-divide-right {
+ border-right: 1px solid #CCCCCC;
+}
+
+
+/* ***************************************
SPACING (from OOCSS)
*************************************** */
.pan{padding:0}