mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- member directory;
This commit is contained in:
+118
-112
@@ -1,140 +1,146 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
|
||||
<script type="text/template" id="tmpl-um-member-grid">
|
||||
<div class="um-members-grid">
|
||||
<div class="um-members-intro">
|
||||
<div class="um-members-total">
|
||||
<# if ( data.args.show_count ) { #>
|
||||
<# if ( data.users.length == 1 ) { #>
|
||||
{{{data.pagination.header_single}}}
|
||||
<# } else if ( data.users.length > 1 ) { #>
|
||||
{{{data.pagination.header}}}
|
||||
<# } #>
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<div class="um-members um-members-grid">
|
||||
<div class="um-gutter-sizer"></div>
|
||||
|
||||
<div class="um-members">
|
||||
<div class="um-gutter-sizer"></div>
|
||||
<# if ( data.length > 0 ) { #>
|
||||
<# _.each( data, function( user, key, list ) { #>
|
||||
|
||||
<# if ( data.users.length > 0 ) { #>
|
||||
<# _.each( data.users, function( user, key, list ) { #>
|
||||
<div class="um-member um-role-{{{user.role}}} {{{user.account_status}}} <?php if ( $cover_photos ) { echo 'with-cover'; } ?>">
|
||||
|
||||
<div class="um-member um-role-{{{user.role}}} {{{user.account_status}}} <?php if ( $cover_photos ) { echo 'with-cover'; } ?>">
|
||||
<span class="um-member-status {{{user.account_status}}}">{{{user.account_status_name}}}</span>
|
||||
<span class="um-member-status {{{user.account_status}}}">
|
||||
{{{user.account_status_name}}}
|
||||
</span>
|
||||
|
||||
|
||||
<?php if ( $cover_photos ) :
|
||||
$sizes = UM()->options()->get( 'cover_thumb_sizes' );
|
||||
$cover_size = UM()->mobile()->isTablet() ? $sizes[1] : $sizes[0];
|
||||
?>
|
||||
<div class="um-member-cover" data-ratio="<?php echo UM()->options()->get( 'profile_cover_ratio' ); ?>">
|
||||
<div class="um-member-cover-e">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.cover_photo}}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ( $profile_photo ) : ?>
|
||||
<div class="um-member-photo radius-<?php echo UM()->options()->get( 'profile_photocorner' ); ?>">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.avatar}}}
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="um-member-card <?php if ( ! $profile_photo ) { echo 'no-photo'; } ?>">
|
||||
<?php if ( $show_name ) : ?>
|
||||
<div class="um-member-name">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.display_name_html}}}
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php do_action( 'um_members_just_after_name_tmpl', $args ); ?>
|
||||
{{{user.hook_just_after_name}}}
|
||||
|
||||
|
||||
<# if ( user.can_edit ) { #>
|
||||
<div class="um-members-edit-btn">
|
||||
<a href="{{{user.edit_profile_url}}}" class="um-edit-profile-btn um-button um-alt"> <?php _e( 'Edit profile','ultimate-member' ) ?> </a>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
|
||||
<?php do_action( 'um_members_after_user_name_tmpl', $args ); ?>
|
||||
{{{user.hook_after_user_name}}}
|
||||
|
||||
|
||||
<?php
|
||||
if ( $show_tagline && is_array( $tagline_fields ) ) :
|
||||
foreach ( $tagline_fields as $key ) :
|
||||
if ( empty( $key ) ) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
|
||||
<# if ( user.<?php echo $key;?> ) { #>
|
||||
<div class="um-member-tagline um-member-tagline-<?php echo $key;?>" data-key="<?php echo $key;?>">
|
||||
{{{user.<?php echo $key;?>}}}
|
||||
<?php if ( $cover_photos ) { ?>
|
||||
<div class="um-member-cover" data-ratio="<?php echo esc_attr( UM()->options()->get( 'profile_cover_ratio' ) ); ?>">
|
||||
<div class="um-member-cover-e">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.cover_photo}}}
|
||||
</a>
|
||||
</div>
|
||||
<# } #>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
if ( $profile_photo ) { ?>
|
||||
<div class="um-member-photo radius-<?php echo esc_attr( UM()->options()->get( 'profile_photocorner' ) ); ?>">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.avatar}}}
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ( $show_userinfo ) : ?>
|
||||
<div class="um-member-meta-main">
|
||||
<?php if ( $userinfo_animate ) { ?>
|
||||
<div class="um-member-more"><a href="javascript:void(0);"><i class="um-faicon-angle-down"></i></a></div>
|
||||
<div class="um-member-card <?php if ( ! $profile_photo ) { echo 'no-photo'; } ?>">
|
||||
<?php if ( $show_name ) { ?>
|
||||
<div class="um-member-name">
|
||||
<a href="{{{user.profile_url}}}" title="{{{user.display_name}}}">
|
||||
{{{user.display_name_html}}}
|
||||
</a>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
do_action( 'um_members_just_after_name_tmpl', $args ); ?>
|
||||
{{{user.hook_just_after_name}}}
|
||||
|
||||
|
||||
<# if ( user.can_edit ) { #>
|
||||
<div class="um-members-edit-btn">
|
||||
<a href="{{{user.edit_profile_url}}}" class="um-edit-profile-btn um-button um-alt">
|
||||
<?php _e( 'Edit profile','ultimate-member' ) ?>
|
||||
</a>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
|
||||
<?php do_action( 'um_members_after_user_name_tmpl', $args ); ?>
|
||||
{{{user.hook_after_user_name}}}
|
||||
|
||||
|
||||
<?php if ( $show_tagline && ! empty( $tagline_fields ) && is_array( $tagline_fields ) ) {
|
||||
foreach ( $tagline_fields as $key ) {
|
||||
if ( empty( $key ) ) {
|
||||
continue;
|
||||
} ?>
|
||||
|
||||
<# if ( typeof user.<?php echo $key; ?> !== 'undefined' ) { #>
|
||||
<div class="um-member-tagline um-member-tagline-<?php echo esc_attr( $key ); ?>"
|
||||
data-key="<?php echo esc_attr( $key ); ?>">
|
||||
{{{user.<?php echo $key; ?>}}}
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
<?php }
|
||||
}
|
||||
|
||||
if ( $show_userinfo ) { ?>
|
||||
|
||||
<# var $show_block = false; #>
|
||||
|
||||
<?php foreach ( $reveal_fields as $k => $key ) {
|
||||
if ( empty( $key ) ) {
|
||||
unset( $reveal_fields[ $k ] );
|
||||
} ?>
|
||||
|
||||
<# $show_block = typeof user.<?php echo $key; ?> !== 'undefined'; #>
|
||||
<?php }
|
||||
|
||||
if ( $show_social ) { ?>
|
||||
<# if ( ! $show_block ) { #>
|
||||
<# $show_block = user.social_urls #>
|
||||
<# } #>
|
||||
<?php } ?>
|
||||
|
||||
<div class="um-member-meta <?php if ( !$userinfo_animate ) { echo 'no-animate'; } ?>">
|
||||
<# if ( $show_block ) { #>
|
||||
<div class="um-member-meta-main">
|
||||
|
||||
<?php
|
||||
foreach ( $reveal_fields as $key ) :
|
||||
if ( empty( $key ) ) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<# if ( user.<?php echo $key;?> ) { #>
|
||||
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>"> <span><strong>{{{user.label_<?php echo $key;?>}}}:</strong> {{{user.<?php echo $key;?>}}} </span> </div>
|
||||
<# } #>
|
||||
<?php endforeach; ?>
|
||||
<?php if ( $userinfo_animate ) { ?>
|
||||
<div class="um-member-more">
|
||||
<a href="javascript:void(0);"><i class="um-faicon-angle-down"></i></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="um-member-meta <?php if ( ! $userinfo_animate ) { echo 'no-animate'; } ?>">
|
||||
|
||||
<?php if ( $show_social ) : ?>
|
||||
<div class="um-member-connect">
|
||||
{{{user.social_urls}}}
|
||||
<?php foreach ( $reveal_fields as $key ) { ?>
|
||||
|
||||
<# if ( typeof user.<?php echo $key; ?> !== 'undefined' ) { #>
|
||||
<div class="um-member-metaline um-member-metaline-<?php echo $key; ?>">
|
||||
<strong>{{{user.label_<?php echo $key;?>}}}:</strong> {{{user.<?php echo $key;?>}}}
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
<?php }
|
||||
|
||||
if ( $show_social ) { ?>
|
||||
<div class="um-member-connect">
|
||||
{{{user.social_urls}}}
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="um-member-less"><a href="javascript:void(0);"><i class="um-faicon-angle-up"></i></a></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( $userinfo_animate ) { ?>
|
||||
<div class="um-member-less">
|
||||
<a href="javascript:void(0);"><i class="um-faicon-angle-up"></i></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<# } #>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<# }); #>
|
||||
<# } else { #>
|
||||
<# } else { #>
|
||||
|
||||
<div class="um-members-none">
|
||||
<p><?php echo $args['no_users']; ?></p>
|
||||
<p><?php echo $no_users; ?></p>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
<div class="um-clear"></div>
|
||||
</div>
|
||||
</script>
|
||||
Reference in New Issue
Block a user