Revision 20e2dbc5
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/controllers/base.js | ||
---|---|---|
16 | 16 |
iconCls: function () { |
17 | 17 |
return 'snf-'+this.get('_item')+'-full'; |
18 | 18 |
}.property(), |
19 |
|
|
20 |
// allows grid-view/list-view icons in actions-bar |
|
21 |
hasViewOptions: true, |
|
19 | 22 |
|
23 |
// allows search functionality |
|
24 |
hasSearch: true, |
|
25 |
|
|
26 |
// allows items filtering |
|
27 |
hasFilter: true, |
|
28 |
|
|
29 |
pageTitle: function () { |
|
30 |
return this.get('type')+' ('+this.get('viewCls')+')'; |
|
31 |
}.property(), |
|
32 |
|
|
33 |
// used for link-to purposes |
|
34 |
parent: function () { |
|
35 |
return this.type; |
|
36 |
}.property(), |
|
37 |
|
|
38 |
// used for link-to purposes |
|
39 |
childInit: function () { |
|
40 |
return this.get('_item')+'init'; |
|
41 |
}.property(), |
|
42 |
|
|
20 | 43 |
}); |
21 | 44 |
|
22 | 45 |
Snf.ElemController = Ember.ObjectController.extend({ |
... | ... | |
27 | 50 |
|
28 | 51 |
hasConnect: false, |
29 | 52 |
|
53 |
// allows grid-view/list-view icons in actions-bar |
|
54 |
hasViewOptions: true, |
|
55 |
|
|
56 |
// allows search functionality |
|
57 |
hasSearch: false, |
|
58 |
|
|
59 |
// allows items filtering |
|
60 |
hasFilter: false, |
|
61 |
|
|
62 |
pageTitle: function (){ |
|
63 |
return this.get('model').get('name'); |
|
64 |
}.property(), |
|
65 |
|
|
66 |
parent: function() { |
|
67 |
return this.type+'s'; |
|
68 |
}.property(), |
|
69 |
|
|
70 |
childInit: function() { |
|
71 |
return this.codeName+'init'; |
|
72 |
}.property(), |
|
73 |
|
|
30 | 74 |
}); |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/templates/_actions-bar.hbs | ||
---|---|---|
1 |
<section class="actions-bar clearfix"> |
|
2 |
|
|
3 |
<h2>{{pageTitle}}</h2> |
|
4 |
|
|
5 |
{{#if hasViewOptions}} |
|
6 |
<div class="rt-actions"> |
|
7 |
{{#link-to childInit class="single"}}{{/link-to}} |
|
8 |
{{#link-to parent 'grid-view'}}<span class="snf-gridview">{{/link-to}} |
|
9 |
{{#link-to parent 'list-view'}}<span class="snf-listview"></span>{{/link-to}} |
|
10 |
</div> |
|
11 |
{{/if}} |
|
12 |
|
|
13 |
{{#if hasFilter}} |
|
14 |
<div class="filter-menu"> |
|
15 |
<div><a class="filter" href="">Filter</a></div> |
|
16 |
<ul class="options"> |
|
17 |
<li><a href="">option 1</a></li> |
|
18 |
<li><a href="">option 2</a></li> |
|
19 |
<li><a href="">option 3</a></li> |
|
20 |
<li><a href="">option 4</a></li> |
|
21 |
</ul> |
|
22 |
</div> |
|
23 |
{{/if}} |
|
24 |
|
|
25 |
{{#if hasSearch}} |
|
26 |
<div id="hd-search" class="hd-search"> |
|
27 |
<form> |
|
28 |
<span class="hd-icon-search snf-search"></span> |
|
29 |
<input class="hd-search-input" placeholder="Enter your search term..." type="search" value="" name="search" id="search"> |
|
30 |
</form> |
|
31 |
</div> |
|
32 |
{{/if}} |
|
33 |
|
|
34 |
</section> |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/templates/elems.hbs | ||
---|---|---|
1 |
{{partial 'actions-bar'}} |
|
1 | 2 |
<section class="main row"> |
2 | 3 |
<div {{bind-attr class=":entities viewCls"}}> |
3 | 4 |
<ul class="items-list"> |
Also available in: Unified diff