1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
<div
id='admin-pane-posts'
class='tab-pane'
role='tabpanel'
>
<div class='panel panel-default'>
<div class='panel-heading'>
<div class='btn-toolbar'>
<div class='btn-group btn-group-sm'><%=
new_post_button
%></div><!-- btn-group -->
<%= divider %>
<div class='btn-group btn-group-sm'><%=
dropdown(
id: "posts-filter-type",
css: "posts-filter-menu",
name: "Type",
text: "Filter posts by type.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all types.",
}, {
:type => "divider",
}] + %i{blog page project}.map { |id|
# get post type
post_type = Guff::POST_TYPES[id]
{
:id => post_type[:id],
:name => post_type[:name],
:icon => post_type[:icon],
:text => "Show #{post_type[:name]}s.",
}
}
)
%></div><!-- btn-group -->
<div class='btn-group btn-group-sm'><%=
dropdown(
id: "posts-filter-state",
css: "posts-filter-menu",
name: "State",
text: "Filter by post state.",
icon: "",
default: "default",
items: [{
:id => "default",
:name => "Default",
:text => "Show drafts and posted items.",
}, {
:type => "divider",
}].concat(states_menu_items),
)
%></div><!-- btn-group -->
<div class='btn-group btn-group-sm'><%=
dropdown(
id: "posts-filter-site",
css: "posts-filter-menu",
name: "Site",
text: "Filter by site.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all sites.",
}, {
:type => "divider",
}].concat(sites_menu_items),
)
%></div><!-- btn-group -->
<div class='btn-group btn-group-sm'><%=
dropdown(
id: "posts-filter-user",
css: "posts-filter-menu",
name: "Author",
text: "Filter by author.",
icon: "",
default: "all",
items: [{
:id => "all",
:name => "All",
:text => "Show all authors.",
}, {
:type => "divider",
}].concat(authors_menu_items),
)
%></div><!-- btn-group -->
<div class='btn-group btn-group-sm pull-right'>
<a
href='#'
class='btn btn-default search-toggle'
title='Toggle search field.'
>
<i class='fa fa-fw fa-search'></i>
</a><!-- btn-->
</div><!-- btn-group -->
<div class='btn-group btn-group-sm pull-right'>
<a
href='#'
id='posts-reload'
class='btn btn-default'
title='Reload posts'
>
<span class='loading'>
<i class='fa fa-fw fa-refresh'></i>
</span>
<span class='loading hidden'>
<i class='fa fa-fw fa-spinner fa-spin'></i>
</span>
</a><!-- btn -->
</div><!-- btn-group -->
</div><!-- btn-toolbar -->
</div><!-- panel-heading -->
<div class='panel-heading hidden search-toggle'>
<div class='input-group input-group-sm'>
<span class='input-group-addon'>
<i class='fa fa-search'></i>
</span>
<input
type='text'
id='posts-q'
class='form-control'
title='Enter search terms'
/>
</div><!-- input-group -->
</div><!-- panel-heading -->
<table
id='posts'
class='table table-hover'
>
<thead>
<tr class='small'>
<th> </th>
<th>Name</th>
<th>Site</th>
<th>Slug</th>
<th>Author</th>
<th>Created</th>
<th>Posted</th>
</tr>
</thead>
<tbody>
</tbody>
</table><!-- table -->
</div><!-- panel -->
</div><!-- tab-pane -->
|