From fa68bac1233f7cdebe06a5182a69227f82c6c1f7 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Mon, 8 Aug 2016 17:32:01 +0100 Subject: [PATCH] Alternate size for artists --- public/templates/artists/list.html | 2 +- public/templates/directives/users-list.html | 4 ++-- .../scripts/app/directives/users-list.coffee | 17 ++++++++++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/public/templates/artists/list.html b/public/templates/artists/list.html index 48635e61..22741f23 100644 --- a/public/templates/artists/list.html +++ b/public/templates/artists/list.html @@ -1,3 +1,3 @@
- +
diff --git a/public/templates/directives/users-list.html b/public/templates/directives/users-list.html index 21011e07..71e34136 100644 --- a/public/templates/directives/users-list.html +++ b/public/templates/directives/users-list.html @@ -1,9 +1,9 @@ -
+

No users found…

- + diff --git a/resources/assets/scripts/app/directives/users-list.coffee b/resources/assets/scripts/app/directives/users-list.coffee index 35c24e7f..0a019e62 100644 --- a/resources/assets/scripts/app/directives/users-list.coffee +++ b/resources/assets/scripts/app/directives/users-list.coffee @@ -20,10 +20,25 @@ module.exports = angular.module('ponyfm').directive 'pfmUsersList', () -> templateUrl: '/templates/directives/users-list.html' scope: users: '=users', - class: '@class' + class: '@class', + size: '@size' controller: [ '$scope', 'auth' ($scope, auth) -> + if typeof $scope.size == 'undefined' + $scope.size = 'large' + + if $scope.size == 'small' + $scope.lgSize = '20' + $scope.mdSize = '33' + $scope.smSize = '50' + $scope.xsSize = '100' + else + $scope.lgSize = '15' + $scope.mdSize = '' + $scope.smSize = '20' + $scope.xsSize = '50' + $scope.auth = auth.data ]