2012-07-11 16:28:51 +00:00
< div class = " item-list-tabs no-ajax " id = " subnav " role = " navigation " >
< ul >
< ? php bp_group_admin_tabs (); ?>
</ ul >
</ div ><!-- . item - list - tabs -->
2012-08-08 16:49:22 +00:00
< form action = " <?php bp_group_admin_form_action() ?> " name = " group-settings-form " id = " group-settings-form " class = " standard-form " method = " post " enctype = " multipart/form-data " role = " main " >
2012-07-11 16:28:51 +00:00
2012-08-08 16:49:22 +00:00
< ? php do_action ( 'bp_before_group_admin_content' ) ?>
2012-07-11 16:28:51 +00:00
< ? php /* Edit Group Details */ ?>
< ? php if ( bp_is_group_admin_screen ( 'edit-details' ) ) : ?>
< ? php do_action ( 'bp_before_group_details_admin' ); ?>
< label for = " group-name " >< ? php _e ( 'Group Name (required)' , 'buddypress' ); ?> </label>
2012-08-08 16:49:22 +00:00
< input type = " text " name = " group-name " id = " group-name " value = " <?php bp_group_name() ?> " aria - required = " true " />
2012-07-11 16:28:51 +00:00
< label for = " group-desc " >< ? php _e ( 'Group Description (required)' , 'buddypress' ); ?> </label>
2012-08-08 16:49:22 +00:00
< textarea name = " group-desc " id = " group-desc " aria - required = " true " >< ? php bp_group_description_editable () ?> </textarea>
2012-07-11 16:28:51 +00:00
2012-08-08 16:49:22 +00:00
< ? php do_action ( 'groups_custom_group_fields_editable' ) ?>
2012-07-11 16:28:51 +00:00
< p >
< label for = " group-notifiy-members " >< ? php _e ( 'Notify group members of changes via email' , 'buddypress' ); ?> </label>
< input type = " radio " name = " group-notify-members " value = " 1 " /> < ? php _e ( 'Yes' , 'buddypress' ); ?>
< input type = " radio " name = " group-notify-members " value = " 0 " checked = " checked " /> < ? php _e ( 'No' , 'buddypress' ); ?>
</ p >
< ? php do_action ( 'bp_after_group_details_admin' ); ?>
2012-08-08 16:49:22 +00:00
< p >< input type = " submit " value = " <?php _e( 'Save Changes', 'buddypress' ) ?> " id = " save " name = " save " /></ p >
< ? php wp_nonce_field ( 'groups_edit_group_details' ) ?>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
< ? php /* Manage Group Settings */ ?>
< ? php if ( bp_is_group_admin_screen ( 'group-settings' ) ) : ?>
< ? php do_action ( 'bp_before_group_settings_admin' ); ?>
< ? php if ( bp_is_active ( 'forums' ) ) : ?>
< ? php if ( bp_forums_is_installed_correctly () ) : ?>
< div class = " checkbox " >
2012-08-08 16:49:22 +00:00
< label >< input type = " checkbox " name = " group-show-forum " id = " group-show-forum " value = " 1 " < ? php bp_group_show_forum_setting () ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ) ?></label>
2012-07-11 16:28:51 +00:00
</ div >
< hr />
< ? php endif ; ?>
< ? php endif ; ?>
< h4 >< ? php _e ( 'Privacy Options' , 'buddypress' ); ?> </h4>
< div class = " radio " >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-status " value = " public " < ? php bp_group_show_status_setting ( 'public' ) ?> />
< strong >< ? php _e ( 'This is a public group' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
< ul >
2012-08-08 16:49:22 +00:00
< li >< ? php _e ( 'Any site member can join this group.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'This group will be listed in the groups directory and in search results.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'Group content and activity will be visible to any site member.' , 'buddypress' ) ?> </li>
2012-07-11 16:28:51 +00:00
</ ul >
</ label >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-status " value = " private " < ? php bp_group_show_status_setting ( 'private' ) ?> />
< strong >< ? php _e ( 'This is a private group' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
< ul >
2012-08-08 16:49:22 +00:00
< li >< ? php _e ( 'Only users who request membership and are accepted can join the group.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'This group will be listed in the groups directory and in search results.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'Group content and activity will only be visible to members of the group.' , 'buddypress' ) ?> </li>
2012-07-11 16:28:51 +00:00
</ ul >
</ label >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-status " value = " hidden " < ? php bp_group_show_status_setting ( 'hidden' ) ?> />
< strong >< ? php _e ( 'This is a hidden group' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
< ul >
2012-08-08 16:49:22 +00:00
< li >< ? php _e ( 'Only users who are invited can join the group.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'This group will not be listed in the groups directory or search results.' , 'buddypress' ) ?> </li>
< li >< ? php _e ( 'Group content and activity will only be visible to members of the group.' , 'buddypress' ) ?> </li>
2012-07-11 16:28:51 +00:00
</ ul >
</ label >
</ div >
< hr />
< h4 >< ? php _e ( 'Group Invitations' , 'buddypress' ); ?> </h4>
2012-08-08 16:49:22 +00:00
< p >< ? php _e ( 'Which members of this group are allowed to invite others?' , 'buddypress' ) ?> </p>
2012-07-11 16:28:51 +00:00
< div class = " radio " >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-invite-status " value = " members " < ? php bp_group_show_invite_status_setting ( 'members' ) ?> />
< strong >< ? php _e ( 'All group members' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
</ label >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-invite-status " value = " mods " < ? php bp_group_show_invite_status_setting ( 'mods' ) ?> />
< strong >< ? php _e ( 'Group admins and mods only' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
</ label >
< label >
2012-08-08 16:49:22 +00:00
< input type = " radio " name = " group-invite-status " value = " admins " < ? php bp_group_show_invite_status_setting ( 'admins' ) ?> />
< strong >< ? php _e ( 'Group admins only' , 'buddypress' ) ?> </strong>
2012-07-11 16:28:51 +00:00
</ label >
</ div >
< hr />
< ? php do_action ( 'bp_after_group_settings_admin' ); ?>
2012-08-08 16:49:22 +00:00
< p >< input type = " submit " value = " <?php _e( 'Save Changes', 'buddypress' ) ?> " id = " save " name = " save " /></ p >
< ? php wp_nonce_field ( 'groups_edit_group_settings' ) ?>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
< ? php /* Group Avatar Settings */ ?>
< ? php if ( bp_is_group_admin_screen ( 'group-avatar' ) ) : ?>
< ? php if ( 'upload-image' == bp_get_avatar_admin_step () ) : ?>
2012-08-08 16:49:22 +00:00
< p >< ? php _e ( " Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results. " , 'buddypress' ) ?> </p>
2012-07-11 16:28:51 +00:00
< p >
< input type = " file " name = " file " id = " file " />
2012-08-08 16:49:22 +00:00
< input type = " submit " name = " upload " id = " upload " value = " <?php _e( 'Upload Image', 'buddypress' ) ?> " />
2012-07-11 16:28:51 +00:00
< input type = " hidden " name = " action " id = " action " value = " bp_avatar_upload " />
</ p >
< ? php if ( bp_get_group_has_avatar () ) : ?>
2012-08-08 16:49:22 +00:00
< p >< ? php _e ( " If you'd like to remove the existing avatar but not upload a new one, please use the delete avatar button. " , 'buddypress' ) ?> </p>
2012-07-11 16:28:51 +00:00
< ? php bp_button ( array ( 'id' => 'delete_group_avatar' , 'component' => 'groups' , 'wrapper_id' => 'delete-group-avatar-button' , 'link_class' => 'edit' , 'link_href' => bp_get_group_avatar_delete_link (), 'link_title' => __ ( 'Delete Avatar' , 'buddypress' ), 'link_text' => __ ( 'Delete Avatar' , 'buddypress' ) ) ); ?>
< ? php endif ; ?>
2012-08-08 16:49:22 +00:00
< ? php wp_nonce_field ( 'bp_avatar_upload' ) ?>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
< ? php if ( 'crop-image' == bp_get_avatar_admin_step () ) : ?>
2012-08-08 16:49:22 +00:00
< h3 >< ? php _e ( 'Crop Avatar' , 'buddypress' ) ?> </h3>
2012-07-11 16:28:51 +00:00
2012-08-08 16:49:22 +00:00
< img src = " <?php bp_avatar_to_crop() ?> " id = " avatar-to-crop " class = " avatar " alt = " <?php _e( 'Avatar to crop', 'buddypress' ) ?> " />
2012-07-11 16:28:51 +00:00
< div id = " avatar-crop-pane " >
2012-08-08 16:49:22 +00:00
< img src = " <?php bp_avatar_to_crop() ?> " id = " avatar-crop-preview " class = " avatar " alt = " <?php _e( 'Avatar preview', 'buddypress' ) ?> " />
2012-07-11 16:28:51 +00:00
</ div >
2012-08-08 16:49:22 +00:00
< input type = " submit " name = " avatar-crop-submit " id = " avatar-crop-submit " value = " <?php _e( 'Crop Image', 'buddypress' ) ?> " />
2012-07-11 16:28:51 +00:00
2012-08-08 16:49:22 +00:00
< input type = " hidden " name = " image_src " id = " image_src " value = " <?php bp_avatar_to_crop_src() ?> " />
2012-07-11 16:28:51 +00:00
< input type = " hidden " id = " x " name = " x " />
< input type = " hidden " id = " y " name = " y " />
< input type = " hidden " id = " w " name = " w " />
< input type = " hidden " id = " h " name = " h " />
2012-08-08 16:49:22 +00:00
< ? php wp_nonce_field ( 'bp_avatar_cropstore' ) ?>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
< ? php endif ; ?>
< ? php /* Manage Group Members */ ?>
< ? php if ( bp_is_group_admin_screen ( 'manage-members' ) ) : ?>
< ? php do_action ( 'bp_before_group_manage_members_admin' ); ?>
< div class = " bp-widget " >
< h4 >< ? php _e ( 'Administrators' , 'buddypress' ); ?> </h4>
< ? php if ( bp_has_members ( '&include=' . bp_group_admin_ids () ) ) : ?>
2012-08-08 16:49:22 +00:00
< ul id = " admins-list " class = " item-list single-line> " >
2012-07-11 16:28:51 +00:00
< ? php while ( bp_members () ) : bp_the_member (); ?>
< li >
2012-08-08 16:49:22 +00:00
< ? php echo bp_core_fetch_avatar ( array ( 'item_id' => bp_get_member_user_id (), 'type' => 'thumb' , 'width' => 30 , 'height' => 30 , 'alt' => __ ( 'Profile picture of %s' , 'buddypress' ) ) ) ?>
2012-07-11 16:28:51 +00:00
< h5 >
< a href = " <?php bp_member_permalink(); ?> " > < ? php bp_member_name (); ?> </a>
< span class = " small " >
2012-08-08 16:49:22 +00:00
< a class = " button confirm admin-demote-to-member " href = " <?php bp_group_member_demote_link( bp_get_member_user_id() ) ?> " >< ? php _e ( 'Demote to Member' , 'buddypress' ) ?> </a>
2012-07-11 16:28:51 +00:00
</ span >
</ h5 >
</ li >
< ? php endwhile ; ?>
</ ul >
< ? php endif ; ?>
</ div >
< ? php if ( bp_group_has_moderators () ) : ?>
< div class = " bp-widget " >
2012-08-08 16:49:22 +00:00
< h4 >< ? php _e ( 'Moderators' , 'buddypress' ) ?> </h4>
2012-07-11 16:28:51 +00:00
< ? php if ( bp_has_members ( '&include=' . bp_group_mod_ids () ) ) : ?>
2012-08-08 16:49:22 +00:00
< ul id = " mods-list " class = " item-list " >
2012-07-11 16:28:51 +00:00
< ? php while ( bp_members () ) : bp_the_member (); ?>
< li >
2012-08-08 16:49:22 +00:00
< ? php echo bp_core_fetch_avatar ( array ( 'item_id' => bp_get_member_user_id (), 'type' => 'thumb' , 'width' => 30 , 'height' => 30 , 'alt' => __ ( 'Profile picture of %s' , 'buddypress' ) ) ) ?>
2012-07-11 16:28:51 +00:00
< h5 >
< a href = " <?php bp_member_permalink(); ?> " > < ? php bp_member_name (); ?> </a>
< span class = " small " >
2012-08-08 16:49:22 +00:00
< a href = " <?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ) ?> " class = " button confirm mod-promote-to-admin " title = " <?php _e( 'Promote to Admin', 'buddypress' ); ?> " >< ? php _e ( 'Promote to Admin' , 'buddypress' ); ?> </a>
< a class = " button confirm mod-demote-to-member " href = " <?php bp_group_member_demote_link( bp_get_member_user_id() ) ?> " >< ? php _e ( 'Demote to Member' , 'buddypress' ) ?> </a>
2012-07-11 16:28:51 +00:00
</ span >
</ h5 >
</ li >
< ? php endwhile ; ?>
</ ul >
< ? php endif ; ?>
</ div >
< ? php endif ?>
< div class = " bp-widget " >
< h4 >< ? php _e ( " Members " , " buddypress " ); ?> </h4>
< ? php if ( bp_group_has_members ( 'per_page=15&exclude_banned=false' ) ) : ?>
< ? php if ( bp_group_member_needs_pagination () ) : ?>
< div class = " pagination no-ajax " >
< div id = " member-count " class = " pag-count " >
2012-08-08 16:49:22 +00:00
< ? php bp_group_member_pagination_count () ?>
2012-07-11 16:28:51 +00:00
</ div >
< div id = " member-admin-pagination " class = " pagination-links " >
2012-08-08 16:49:22 +00:00
< ? php bp_group_member_admin_pagination () ?>
2012-07-11 16:28:51 +00:00
</ div >
</ div >
< ? php endif ; ?>
< ul id = " members-list " class = " item-list single-line " >
< ? php while ( bp_group_members () ) : bp_group_the_member (); ?>
< li class = " <?php bp_group_member_css_class(); ?> " >
2012-08-08 16:49:22 +00:00
< ? php bp_group_member_avatar_mini () ?>
2012-07-11 16:28:51 +00:00
< h5 >
2012-08-08 16:49:22 +00:00
< ? php bp_group_member_link () ?>
2012-07-11 16:28:51 +00:00
< ? php if ( bp_get_group_member_is_banned () ) _e ( '(banned)' , 'buddypress' ); ?>
< span class = " small " >
< ? php if ( bp_get_group_member_is_banned () ) : ?>
2012-08-08 16:49:22 +00:00
< a href = " <?php bp_group_member_unban_link() ?> " class = " button confirm member-unban " title = " <?php _e( 'Unban this member', 'buddypress' ) ?> " >< ? php _e ( 'Remove Ban' , 'buddypress' ); ?> </a>
2012-07-11 16:28:51 +00:00
< ? php else : ?>
2012-08-08 16:49:22 +00:00
< a href = " <?php bp_group_member_ban_link() ?> " class = " button confirm member-ban " title = " <?php _e( 'Kick and ban this member', 'buddypress' ); ?> " >< ? php _e ( 'Kick & Ban' , 'buddypress' ); ?> </a>
< a href = " <?php bp_group_member_promote_mod_link() ?> " class = " button confirm member-promote-to-mod " title = " <?php _e( 'Promote to Mod', 'buddypress' ); ?> " >< ? php _e ( 'Promote to Mod' , 'buddypress' ); ?> </a>
< a href = " <?php bp_group_member_promote_admin_link() ?> " class = " button confirm member-promote-to-admin " title = " <?php _e( 'Promote to Admin', 'buddypress' ); ?> " >< ? php _e ( 'Promote to Admin' , 'buddypress' ); ?> </a>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
2012-08-08 16:49:22 +00:00
< a href = " <?php bp_group_member_remove_link() ?> " class = " button confirm " title = " <?php _e( 'Remove this member', 'buddypress' ); ?> " >< ? php _e ( 'Remove from group' , 'buddypress' ); ?> </a>
2012-07-11 16:28:51 +00:00
< ? php do_action ( 'bp_group_manage_members_admin_item' ); ?>
</ span >
</ h5 >
</ li >
< ? php endwhile ; ?>
</ ul >
< ? php else : ?>
< div id = " message " class = " info " >
< p >< ? php _e ( 'This group has no members.' , 'buddypress' ); ?> </p>
</ div >
< ? php endif ; ?>
</ div >
< ? php do_action ( 'bp_after_group_manage_members_admin' ); ?>
< ? php endif ; ?>
< ? php /* Manage Membership Requests */ ?>
< ? php if ( bp_is_group_admin_screen ( 'membership-requests' ) ) : ?>
< ? php do_action ( 'bp_before_group_membership_requests_admin' ); ?>
< ? php if ( bp_group_has_membership_requests () ) : ?>
< ul id = " request-list " class = " item-list " >
< ? php while ( bp_group_membership_requests () ) : bp_group_the_membership_request (); ?>
< li >
2012-08-08 16:49:22 +00:00
< ? php bp_group_request_user_avatar_thumb () ?>
< h4 >< ? php bp_group_request_user_link () ?> <span class="comments"><?php bp_group_request_comment() ?></span></h4>
< span class = " activity " >< ? php bp_group_request_time_since_requested () ?> </span>
2012-07-11 16:28:51 +00:00
< ? php do_action ( 'bp_group_membership_requests_admin_item' ); ?>
< div class = " action " >
< ? php bp_button ( array ( 'id' => 'group_membership_accept' , 'component' => 'groups' , 'wrapper_class' => 'accept' , 'link_href' => bp_get_group_request_accept_link (), 'link_title' => __ ( 'Accept' , 'buddypress' ), 'link_text' => __ ( 'Accept' , 'buddypress' ) ) ); ?>
< ? php bp_button ( array ( 'id' => 'group_membership_reject' , 'component' => 'groups' , 'wrapper_class' => 'reject' , 'link_href' => bp_get_group_request_reject_link (), 'link_title' => __ ( 'Reject' , 'buddypress' ), 'link_text' => __ ( 'Reject' , 'buddypress' ) ) ); ?>
< ? php do_action ( 'bp_group_membership_requests_admin_item_action' ); ?>
</ div >
</ li >
< ? php endwhile ; ?>
</ ul >
< ? php else : ?>
< div id = " message " class = " info " >
< p >< ? php _e ( 'There are no pending membership requests.' , 'buddypress' ); ?> </p>
</ div >
< ? php endif ; ?>
< ? php do_action ( 'bp_after_group_membership_requests_admin' ); ?>
< ? php endif ; ?>
< ? php do_action ( 'groups_custom_edit_steps' ) // Allow plugins to add custom group edit screens ?>
< ? php /* Delete Group Option */ ?>
< ? php if ( bp_is_group_admin_screen ( 'delete-group' ) ) : ?>
< ? php do_action ( 'bp_before_group_delete_admin' ); ?>
< div id = " message " class = " info " >
< p >< ? php _e ( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back, please be careful with this option.' , 'buddypress' ); ?> </p>
</ div >
< label >< input type = " checkbox " name = " delete-group-understand " id = " delete-group-understand " value = " 1 " onclick = " if(this.checked) { document.getElementById('delete-group-button').disabled = ''; } else { document.getElementById('delete-group-button').disabled = 'disabled'; } " /> < ? php _e ( 'I understand the consequences of deleting this group.' , 'buddypress' ); ?> </label>
< ? php do_action ( 'bp_after_group_delete_admin' ); ?>
< div class = " submit " >
2012-08-08 16:49:22 +00:00
< input type = " submit " disabled = " disabled " value = " <?php _e( 'Delete Group', 'buddypress' ) ?> " id = " delete-group-button " name = " delete-group-button " />
2012-07-11 16:28:51 +00:00
</ div >
2012-08-08 16:49:22 +00:00
< ? php wp_nonce_field ( 'groups_delete_group' ) ?>
2012-07-11 16:28:51 +00:00
< ? php endif ; ?>
< ? php /* This is important, don't forget it */ ?>
2012-08-08 16:49:22 +00:00
< input type = " hidden " name = " group-id " id = " group-id " value = " <?php bp_group_id() ?> " />
2012-07-11 16:28:51 +00:00
2012-08-08 16:49:22 +00:00
< ? php do_action ( 'bp_after_group_admin_content' ) ?>
2012-07-11 16:28:51 +00:00
</ form ><!-- #group-settings-form -->