Skip to:
Content

BuddyPress.org

Ticket #4589: admin.php-modified

File admin.php-modified, 15.0 KB (added by simplyletgo, 14 years ago)

updated version of file in bp-groups/

Line 
1<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
2 <ul>
3 <?php bp_group_admin_tabs(); ?>
4 </ul>
5</div><!-- .item-list-tabs -->
6
7<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">
8
9<?php do_action( 'bp_before_group_admin_content' ); ?>
10
11<?php /* Edit Group Details */ ?>
12<?php if ( bp_is_group_admin_screen( 'edit-details' ) ) : ?>
13
14 <?php do_action( 'bp_before_group_details_admin' ); ?>
15
16 <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
17 <input type="text" name="group-name" id="group-name" value="<?php bp_group_name(); ?>" aria-required="true" />
18
19 <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label>
20 <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_group_description_editable(); ?></textarea>
21
22 <?php do_action( 'groups_custom_group_fields_editable' ); ?>
23
24 <p>
25 <label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
26 <input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
27 <input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
28 </p>
29
30 <?php do_action( 'bp_after_group_details_admin' ); ?>
31
32 <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
33 <?php wp_nonce_field( 'groups_edit_group_details' ); ?>
34
35<?php endif; ?>
36
37<?php /* Manage Group Settings */ ?>
38<?php if ( bp_is_group_admin_screen( 'group-settings' ) ) : ?>
39
40 <?php do_action( 'bp_before_group_settings_admin' ); ?>
41
42 <?php if ( bp_is_active( 'forums' ) ) : ?>
43
44 <?php if ( bp_forums_is_installed_correctly() ) : ?>
45
46 <div class="checkbox">
47 <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>
48 </div>
49
50 <hr />
51
52 <?php endif; ?>
53
54 <?php endif; ?>
55
56 <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
57
58 <div class="radio">
59 <label>
60 <input type="radio" name="group-status" value="public"<?php bp_group_show_status_setting( 'public' ); ?> />
61 <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong>
62 <ul>
63 <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
64 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
65 <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
66 </ul>
67 </label>
68
69 <label>
70 <input type="radio" name="group-status" value="private"<?php bp_group_show_status_setting( 'private' ); ?> />
71 <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong>
72 <ul>
73 <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
74 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
75 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
76 </ul>
77 </label>
78
79 <label>
80 <input type="radio" name="group-status" value="hidden"<?php bp_group_show_status_setting( 'hidden' ); ?> />
81 <strong><?php _e( 'This is a hidden group', 'buddypress' ); ?></strong>
82 <ul>
83 <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
84 <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
85 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
86 </ul>
87 </label>
88 </div>
89
90 <hr />
91
92 <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
93
94 <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
95
96 <div class="radio">
97 <label>
98 <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
99 <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
100 </label>
101
102 <label>
103 <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
104 <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
105 </label>
106
107 <label>
108 <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
109 <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
110 </label>
111 </div>
112
113 <hr />
114
115 <?php do_action( 'bp_after_group_settings_admin' ); ?>
116
117 <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
118 <?php wp_nonce_field( 'groups_edit_group_settings' ); ?>
119
120<?php endif; ?>
121
122<?php /* Group Avatar Settings */ ?>
123<?php if ( bp_is_group_admin_screen( 'group-avatar' ) ) : ?>
124
125 <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
126
127 <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>
128
129 <p>
130 <input type="file" name="file" id="file" />
131 <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" />
132 <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
133 </p>
134
135 <?php if ( bp_get_group_has_avatar() ) : ?>
136
137 <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>
138
139 <?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' ) ) ); ?>
140
141 <?php endif; ?>
142
143 <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
144
145 <?php endif; ?>
146
147 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
148
149 <h3><?php _e( 'Crop Avatar', 'buddypress' ); ?></h3>
150
151 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" />
152
153 <div id="avatar-crop-pane">
154 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
155 </div>
156
157 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
158
159 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
160 <input type="hidden" id="x" name="x" />
161 <input type="hidden" id="y" name="y" />
162 <input type="hidden" id="w" name="w" />
163 <input type="hidden" id="h" name="h" />
164
165 <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?>
166
167 <?php endif; ?>
168
169<?php endif; ?>
170
171<?php /* Manage Group Members */ ?>
172<?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
173
174 <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
175
176 <div class="bp-widget">
177 <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
178
179 <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
180
181 <ul id="admins-list" class="item-list single-line">
182
183 <?php while ( bp_members() ) : bp_the_member(); ?>
184 <li>
185 <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
186 <h5>
187 <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
188 <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
189 <span class="small">
190 <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>
191 </span>
192 <?php endif; ?>
193 </h5>
194 </li>
195 <?php endwhile; ?>
196
197 </ul>
198
199 <?php endif; ?>
200
201 </div>
202
203 <?php if ( bp_group_has_moderators() ) : ?>
204 <div class="bp-widget">
205 <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>
206
207 <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
208 <ul id="mods-list" class="item-list single-line">
209
210 <?php while ( bp_members() ) : bp_the_member(); ?>
211 <li>
212 <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
213 <h5>
214 <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
215 <span class="small">
216 <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>
217 <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>
218 </span>
219 </h5>
220 </li>
221 <?php endwhile; ?>
222
223 </ul>
224
225 <?php endif; ?>
226 </div>
227 <?php endif ?>
228
229
230 <div class="bp-widget">
231 <h4><?php _e("Members", "buddypress"); ?></h4>
232
233 <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=false' ) ) : ?>
234
235 <?php if ( bp_group_member_needs_pagination() ) : ?>
236
237 <div class="pagination no-ajax">
238
239 <div id="member-count" class="pag-count">
240 <?php bp_group_member_pagination_count(); ?>
241 </div>
242
243 <div id="member-admin-pagination" class="pagination-links">
244 <?php bp_group_member_admin_pagination(); ?>
245 </div>
246
247 </div>
248
249 <?php endif; ?>
250
251 <ul id="members-list" class="item-list single-line">
252 <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
253
254 <li class="<?php bp_group_member_css_class(); ?>">
255 <?php bp_group_member_avatar_mini(); ?>
256
257 <h5>
258 <?php bp_group_member_link(); ?>
259
260 <?php if ( bp_get_group_member_is_banned() ) _e( '(banned)', 'buddypress'); ?>
261
262 <span class="small">
263
264 <?php if ( bp_get_group_member_is_banned() ) : ?>
265
266 <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>
267
268 <?php else : ?>
269
270 <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 &amp; Ban', 'buddypress' ); ?></a>
271 <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>
272 <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>
273
274 <?php endif; ?>
275
276 <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>
277
278 <?php do_action( 'bp_group_manage_members_admin_item' ); ?>
279
280 </span>
281 </h5>
282 </li>
283
284 <?php endwhile; ?>
285 </ul>
286
287 <?php else: ?>
288
289 <div id="message" class="info">
290 <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p>
291 </div>
292
293 <?php endif; ?>
294
295 </div>
296
297 <?php do_action( 'bp_after_group_manage_members_admin' ); ?>
298
299<?php endif; ?>
300
301<?php /* Manage Membership Requests */ ?>
302<?php if ( bp_is_group_admin_screen( 'membership-requests' ) ) : ?>
303
304 <?php do_action( 'bp_before_group_membership_requests_admin' ); ?>
305
306 <?php if ( bp_group_has_membership_requests() ) : ?>
307
308 <?php if ( bp_group_request_needs_pagination() ) : ?>
309
310 <div class="pagination no-ajax">
311
312 <div id="request-count" class="pag-count">
313 <?php bp_group_request_pagination_count(); ?>
314 </div>
315
316 <div id="request-admin-pagination" class="pagination-links">
317 <?php bp_group_request_admin_pagination(); ?>
318 </div>
319
320 </div>
321
322 <?php endif; ?>
323
324 <ul class="item-list">
325 <?php while ( bp_group_membership_requests() ) : bp_group_the_membership_request(); ?>
326
327 <li>
328 <?php bp_group_request_user_avatar_thumb(); ?>
329 <h4><?php bp_group_request_user_link(); ?> <span class="comments"><?php bp_group_request_comment(); ?></span></h4>
330 <span class="activity"><?php bp_group_request_time_since_requested(); ?></span>
331
332 <?php do_action( 'bp_group_membership_requests_admin_item' ); ?>
333
334 <div class="action">
335
336 <?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' ) ) ); ?>
337
338 <?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' ) ) ); ?>
339
340 <?php do_action( 'bp_group_membership_requests_admin_item_action' ); ?>
341
342 </div>
343 </li>
344
345 <?php endwhile; ?>
346 </ul>
347
348 <?php else: ?>
349
350 <div id="message" class="info">
351 <p><?php _e( 'There are no pending membership requests.', 'buddypress' ); ?></p>
352 </div>
353
354 <?php endif; ?>
355
356 <?php do_action( 'bp_after_group_membership_requests_admin' ); ?>
357
358<?php endif; ?>
359
360<?php do_action( 'groups_custom_edit_steps' ) // Allow plugins to add custom group edit screens ?>
361
362<?php /* Delete Group Option */ ?>
363<?php if ( bp_is_group_admin_screen( 'delete-group' ) ) : ?>
364
365 <?php do_action( 'bp_before_group_delete_admin' ); ?>
366
367 <div id="message" class="info">
368 <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>
369 </div>
370
371 <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>
372
373 <?php do_action( 'bp_after_group_delete_admin' ); ?>
374
375 <div class="submit">
376 <input type="submit" disabled="disabled" value="<?php _e( 'Delete Group', 'buddypress' ); ?>" id="delete-group-button" name="delete-group-button" />
377 </div>
378
379 <?php wp_nonce_field( 'groups_delete_group' ); ?>
380
381<?php endif; ?>
382
383<?php /* This is important, don't forget it */ ?>
384 <input type="hidden" name="group-id" id="group-id" value="<?php bp_group_id(); ?>" />
385
386<?php do_action( 'bp_after_group_admin_content' ); ?>
387
388</form><!-- #group-settings-form -->
389