diff options
author | Sem <sembrestels@riseup.net> | 2011-11-03 17:50:50 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-11-03 17:50:50 +0100 |
commit | 476c4f93769a3d2e7881b228ecfb4623ead6f556 (patch) | |
tree | 11cd8145b4a0a63c1818404af5284fc9abc054d1 /mod/uservalidationbyemail | |
parent | 0db0b0578728e30b990123cad1e15bd71acfdbaf (diff) | |
download | elgg-476c4f93769a3d2e7881b228ecfb4623ead6f556.tar.gz elgg-476c4f93769a3d2e7881b228ecfb4623ead6f556.tar.bz2 |
Refs #3867. Unvalidated users is an unordered list now. Added right class and other css helpers to admin css. Standarized css namespaces and dashes in classes. Acomplishing code standards.
Diffstat (limited to 'mod/uservalidationbyemail')
4 files changed, 24 insertions, 26 deletions
diff --git a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php index 4d829778a..036336734 100644 --- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php +++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php @@ -46,14 +46,14 @@ $pagination = elgg_view('navigation/pagination',array( 'limit' => $limit, )); -$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, )); @@ -62,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, )); @@ -71,14 +71,14 @@ $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 pas"> - <ul class="uvbe_admin_controls right"> +<div class="uservalidationbyemail-bulk-actions pas"> + <ul class="uservalidationbyemail-controls right"> <li>$resend_email</li><li>$validate</li><li>$delete</li> </ul> @@ -88,9 +88,14 @@ ___END; //$bulk_actions = elgg_view('page_elements/contentwrapper', array('body' => $bulk_actions)); -$list = ''; -foreach ($users as $user) { - $list .= 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 @@ -99,7 +104,7 @@ echo <<<___END $bulk_actions </div> <div class="elgg-body"> - $list + $html </div> </div> ___END; diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php index f7a1da12d..3ce9a8ac9 100644 --- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php @@ -1,18 +1,14 @@ -.elgg-head .uvbe_bulk_actions label, .elgg-head .uvbe_bulk_actions a{ +.elgg-head .uservalidationbyemail-bulk-actions label, .elgg-head .uservalidationbyemail-bulk-actions a{ color: white; } -.right { - float: right; -} - -.uservalidationbyemail_unvalidated_controls li, .uvbe_admin_controls li { +.uservalidationbyemail-controls li { display: inline; border-right: solid 1px; padding: 0 4px 0 4px; } -.uservalidationbyemail_unvalidated_controls li:last-child, .uvbe_admin_controls li:last-child { +.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 35f1ada7f..a10d7fbe6 100644 --- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php @@ -2,12 +2,12 @@ elgg.provide('elgg.uservalidationbyemail'); elgg.uservalidationbyemail.init = function() { - $('.unvalidated-users-checkall').click(function() { + $('.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) { + $('.uservalidationbyemail-unvalidated-users-bulk-post').click(function(event) { $form = $('form#unvalidated-users'); event.preventDefault(); @@ -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 af4545907..6431712ce 100644 --- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php @@ -37,20 +37,17 @@ $delete = elgg_view('output/confirmlink', array( )); $block = <<<___END -<div class="admin_settings radius8 pas baa"> +<div class="admin-settings radius8 pas baa"> $checkbox<br /> - <ul class="uservalidationbyemail_unvalidated_controls right"> + <ul class="uservalidationbyemail-controls right"> <li>$resend_email</li><li>$validate</li><li>$delete</li> </ul> - <div class="uservalidationbyemail_unvalidated_user_details mll small"> + <div class="uservalidationbyemail-unvalidated-user-details mll small"> $created </div> </div> ___END; echo elgg_view_image_block('', $block); - -?> - |