File tree 2 files changed +110
-3
lines changed
javascripts/backbone/plugins
2 files changed +110
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,12 @@ class Kandan.Plugins.UserList
5
5
@pluginNamespace : " Kandan.Plugins.UserList"
6
6
7
7
@template : _ .template '''
8
- <div class="user clearfix">
8
+ <div class="user clearfix">
9
9
<img class="avatar" src="<%= avatarUrl %>"/>
10
10
<span class="name"><%= name %></span>
11
- <span class="name"> <%= admins %></span>
11
+ <% if(admin){ %>
12
+ <span class="badge badge-important">Admin</span>
13
+ <% } %>
12
14
</div>
13
15
'''
14
16
@@ -24,7 +26,7 @@ class Kandan.Plugins.UserList
24
26
25
27
$users .append @ template ({
26
28
name : displayName,
27
- admins : isAdmin,
29
+ admin : isAdmin,
28
30
avatarUrl : Kandan .Helpers .Avatars .urlFor (user, {size : 25 })
29
31
})
30
32
$el .html ($users)
Original file line number Diff line number Diff line change
1
+ .label ,
2
+ .badge {
3
+ display : inline-block;
4
+ margin-top : 2.5px ;
5
+ margin-left : 5px ;
6
+ padding : 2px 4px ;
7
+ font-size : 12px ;
8
+ font-weight : bold;
9
+ line-height : 12px ;
10
+ color : # ffffff ;
11
+ text-shadow : 0 -1px 0 rgba (0 , 0 , 0 , 0.25 );
12
+ white-space : nowrap;
13
+ vertical-align : baseline;
14
+ background-color : # 999999 ;
15
+ }
16
+
17
+ .label {
18
+ -webkit-border-radius : 3px ;
19
+ -moz-border-radius : 3px ;
20
+ border-radius : 3px ;
21
+ }
22
+
23
+ .badge {
24
+ padding-right : 9px ;
25
+ padding-left : 9px ;
26
+ -webkit-border-radius : 9px ;
27
+ -moz-border-radius : 9px ;
28
+ border-radius : 9px ;
29
+ }
30
+
31
+ .label : empty ,
32
+ .badge : empty {
33
+ display : none;
34
+ }
35
+
36
+ a .label : hover ,
37
+ a .label : focus ,
38
+ a .badge : hover ,
39
+ a .badge : focus {
40
+ color : # ffffff ;
41
+ text-decoration : none;
42
+ cursor : pointer;
43
+ }
44
+
45
+ .label-important ,
46
+ .badge-important {
47
+ background-color : # b94a48 ;
48
+ }
49
+
50
+ .label-important [href ],
51
+ .badge-important [href ] {
52
+ background-color : # 953b39 ;
53
+ }
54
+
55
+ .label-warning ,
56
+ .badge-warning {
57
+ background-color : # f89406 ;
58
+ }
59
+
60
+ .label-warning [href ],
61
+ .badge-warning [href ] {
62
+ background-color : # c67605 ;
63
+ }
64
+
65
+ .label-success ,
66
+ .badge-success {
67
+ background-color : # 468847 ;
68
+ }
69
+
70
+ .label-success [href ],
71
+ .badge-success [href ] {
72
+ background-color : # 356635 ;
73
+ }
74
+
75
+ .label-info ,
76
+ .badge-info {
77
+ background-color : # 3a87ad ;
78
+ }
79
+
80
+ .label-info [href ],
81
+ .badge-info [href ] {
82
+ background-color : # 2d6987 ;
83
+ }
84
+
85
+ .label-inverse ,
86
+ .badge-inverse {
87
+ background-color : # 333333 ;
88
+ }
89
+
90
+ .label-inverse [href ],
91
+ .badge-inverse [href ] {
92
+ background-color : # 1a1a1a ;
93
+ }
94
+
95
+ .btn .label ,
96
+ .btn .badge {
97
+ position : relative;
98
+ top : -1px ;
99
+ }
100
+
101
+ .btn-mini .label ,
102
+ .btn-mini .badge {
103
+ top : 0 ;
104
+ }
105
+
1
106
/*!
2
107
* Font Awesome 3.0.2
3
108
* the iconic font designed for use with Twitter Bootstrap
You can’t perform that action at this time.
0 commit comments