| | |
| | | <?php |
| | | |
| | | use JVBase\managers\Favourites; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; // Exit if accessed directly |
| | | } |
| | |
| | | } |
| | | |
| | | $user_id = get_current_user_id(); |
| | | $JVB = JVB(); |
| | | $favourites = $JVB->routes('favourites'); |
| | | $counts =$favourites->getFavouriteCounts($user_id, false); |
| | | $lists =get_user_meta($user_id, BASE.'favourite_lists', true)?:[]; |
| | | |
| | | $favourites = Favourites::getInstance(); |
| | | $counts =$favourites->getFavouriteCounts($user_id); |
| | | $lists = $favourites->getLists(['user_id' => $user_id]); |
| | | |
| | | |
| | | global $types; |
| | | global $feed_types; |
| | |
| | | <div class="controls"> |
| | | <div class="type-filters"> |
| | | <button type="button" class="type-filter active" data-type="all"> |
| | | <?= jvbIcon('all'); ?> |
| | | <?= jvbIcon('infinity'); ?> |
| | | <span>Everything</span> |
| | | <span class="count">(<?= array_sum($counts); ?>)</span> |
| | | </button> |
| | |
| | | |
| | | <div class="view-controls"> |
| | | <button type="button" class="view-toggle" data-view="grid" aria-pressed="true"> |
| | | <?= jvbIcon('grid'); ?> |
| | | <?= jvbIcon('squares-four'); ?> |
| | | </button> |
| | | <button type="button" class="view-toggle" data-view="list" aria-pressed="false"> |
| | | <?= jvbIcon('list'); ?> |
| | | <?= jvbIcon('rows'); ?> |
| | | </button> |
| | | </div> |
| | | </div> |
| | |
| | | </select> |
| | | <button type="button" class="apply-bulk">Apply</button> |
| | | <button type="button" class="cancel-bulk"> |
| | | <?= jvbIcon('close', ['title'=>'Cancel']); ?> |
| | | <?= jvbIcon('x', ['title'=>'Cancel']); ?> |
| | | </button> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="tab-content" data-tab="lists" role="tabpanel" aria-hidden="true"> |
| | | <div class="lists-header"> |
| | | <button type="button" class="create-list-btn" onclick="window.userFavouritesManager.showCreateListModal()"> |
| | | <?= jvbIcon('add', ['title'=>'Create List']); ?> |
| | | <?= jvbIcon('plus-square', ['title'=>'Create List']); ?> |
| | | <span>Create List</span> |
| | | </button> |
| | | </div> |
| | |
| | | <span>Share</span> |
| | | </button> |
| | | <button type="button" class="duplicate-list" title="Duplicate List"> |
| | | <?= jvbIcon('copy')?> |
| | | <?= jvbIcon('copy-simple')?> |
| | | <span>Duplicate</span> |
| | | </button> |
| | | <button type="button" class="delete-list" title="Delete List"> |
| | | <?= jvbIcon('delete')?> |
| | | <?= jvbIcon('trash')?> |
| | | <span>Delete</span> |
| | | </button> |
| | | </div> |
| | |
| | | </select> |
| | | <button type="button" class="apply-bulk">Apply</button> |
| | | <button type="button" class="cancel-bulk"> |
| | | <?= jvbIcon('close', ['title'=>'Cancel']); ?> |
| | | <?= jvbIcon('x', ['title'=>'Cancel']); ?> |
| | | </button> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="input-with-button"> |
| | | <input type="email" id="share-email" name="share_email" placeholder="Enter email address"> |
| | | <button type="button" class="add-email"> |
| | | <?= jvbIcon('add', ['title'=>'Add share access'])?> |
| | | <?= jvbIcon('plus-square', ['title'=>'Add share access'])?> |
| | | </button> |
| | | </div> |
| | | </div> |