Merge lp:~edb/quam-plures/chicago_less_php into lp:quam-plures
- chicago_less_php
- Merge into trunk
Proposed by
EdB
Status: | Merged |
---|---|
Merged at revision: | 7577 |
Proposed branch: | lp:~edb/quam-plures/chicago_less_php |
Merge into: | lp:quam-plures |
Diff against target: |
618 lines (+143/-340) 3 files modified
qp_view_admin/_access_denied.main.php (+11/-14) qp_view_admin/_adminUI_general.class.php (+130/-123) qp_view_admin/chicago/_adminUI.class.php (+2/-203) |
To merge this branch: | bzr merge lp:~edb/quam-plures/chicago_less_php |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yabs (community) | Approve | ||
Review via email: mp+44141@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Yabs (yabs) wrote : | # |
Waited long enough, we need to get this all wrapped up
¥
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'qp_view_admin/_access_denied.main.php' |
2 | --- qp_view_admin/_access_denied.main.php 2010-07-25 18:05:13 +0000 |
3 | +++ qp_view_admin/_access_denied.main.php 2010-12-18 18:32:59 +0000 |
4 | @@ -11,21 +11,18 @@ |
5 | ?> |
6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
8 | - <head> |
9 | - <title><?php echo T_('Access denied') ?></title> |
10 | - </head> |
11 | +<head><title><?php echo T_('Access denied') ?></title></head> |
12 | <body> |
13 | - <div style="background-color:#fee; border: 1px solid red; text-align:center;"> |
14 | - <h1><?php echo T_('Access denied') ?></h1> |
15 | - <p><?php echo T_('Sorry, you have no permission to access this section.') ?></p> |
16 | - </div> |
17 | - <p style="text-align:center;"><?php |
18 | - echo '<a href="'.$srvc_url_sensitive.'login.php?action=logout&redirect_to='.rawurlencode(url_rel_to_same_host($ReqHost.$ReqURI, $srvc_url_sensitive)).'">'.T_('Logout').'</a> |
19 | - • |
20 | - <a href="'.$app_baseurl.'">'.T_('Exit to blogs').'</a>'; |
21 | - ?></p> |
22 | +<div style="background-color:#fee; border: 1px solid red; text-align:center;"> |
23 | +<h1><?php echo T_('Access denied') ?></h1> |
24 | +<p><?php echo T_('Sorry, you have no permission to access this section.') ?></p> |
25 | +<p><?php echo T_('If you just validated your email after registering then click "Exit to blogs" instead of "Logout" (below).') ?></p> |
26 | +</div> |
27 | +<p style="text-align:center;"><?php |
28 | +echo '<a href="'.$srvc_url_sensitive.'login.php?action=logout&redirect_to='.rawurlencode(url_rel_to_same_host($ReqHost.$ReqURI, $srvc_url_sensitive)).'">'.T_('Logout').'</a> • <a href="'.$app_baseurl.'">'.T_('Exit to blogs').'</a>'; |
29 | +?></p> |
30 | </body> |
31 | </html> |
32 | <?php |
33 | - exit(0); |
34 | -?> |
35 | \ No newline at end of file |
36 | +exit(0); |
37 | +?> |
38 | |
39 | === modified file 'qp_view_admin/_adminUI_general.class.php' |
40 | --- qp_view_admin/_adminUI_general.class.php 2010-09-25 12:29:17 +0000 |
41 | +++ qp_view_admin/_adminUI_general.class.php 2010-12-18 18:32:59 +0000 |
42 | @@ -1,6 +1,7 @@ |
43 | <?php |
44 | /** |
45 | * This file implements the Admin UI class. |
46 | + * |
47 | * Admin templates should derive from this class and override {@link get_template()} |
48 | * for example. |
49 | * |
50 | @@ -436,6 +437,7 @@ |
51 | $r = $this->get_html_menu( $path, 'sub' ); |
52 | |
53 | echo $this->replace_vars( $r ); |
54 | + |
55 | $this->displayed_sub_begin = 1; |
56 | } |
57 | else |
58 | @@ -658,6 +660,11 @@ |
59 | */ |
60 | function get_template( $name, $level = 0 ) |
61 | { |
62 | + |
63 | + $pb_begin1 = '<div class="pblock">'; |
64 | + $pb_begin2 = '<div class="panelblock">'; |
65 | + $pb_end = '</div></div>'; |
66 | + |
67 | switch( $name ) |
68 | { |
69 | case 'main': |
70 | @@ -679,29 +686,18 @@ |
71 | ); |
72 | break; |
73 | |
74 | - |
75 | case 'sub': |
76 | // a payload block with embedded submenu |
77 | return array( |
78 | - 'before' => '<div class="pt">' |
79 | - ."\n".'<ul class="hack">' |
80 | - ."\n<li><!-- Yes, this empty UL is needed! It's a DOUBLE hack for correct CSS display --></li>" |
81 | - // TODO: this hack MAY NOT be needed when not using pixels instead of decimal ems or exs in the CSS |
82 | - ."\n</ul>" |
83 | - ."\n".'<div class="panelblocktabs">' |
84 | - ."\n".'<ul class="tabs">', |
85 | - 'after' => "</ul>\n" |
86 | - .'<span style="float:right">$global_icons$</span>' |
87 | - ."</div>\n</div>" |
88 | - ."\n".'<div class="tabbedpanelblock">', |
89 | - 'empty' => '<div class="panelblock">', |
90 | - 'beforeEach' => '<li>', |
91 | - 'afterEach' => '</li>', |
92 | - 'beforeEachSel' => '<li class="current">', |
93 | - 'afterEachSel' => '</li>', |
94 | - 'end' => '</div>', // used to end payload block that opened submenu |
95 | - ); |
96 | - |
97 | + 'before' => '$global_icons$<div id="options"><ul>', |
98 | + 'after' => "</ul></div>\n".$pb_begin1.$pb_begin2, |
99 | + 'empty' => $pb_begin1.$pb_begin2, |
100 | + 'beforeEach' => '<li class="option">', |
101 | + 'afterEach' => '</li>', |
102 | + 'beforeEachSel' => '<li class="current">', |
103 | + 'afterEachSel' => '</li>', |
104 | + 'end' => $pb_end, // used to end payload block that opened submenu |
105 | + ); |
106 | |
107 | case 'menu3': |
108 | // level 3 submenu: |
109 | @@ -715,14 +711,12 @@ |
110 | 'afterEachSel' => '</span>', |
111 | ); |
112 | |
113 | - |
114 | case 'block': |
115 | // an additional payload block, anywhere after the one with the submenu. Used by disp_payload_begin()/disp_payload_end() |
116 | return array( |
117 | - 'begin' => '<div class="panelblock">', |
118 | - 'end' => "\n</div>", |
119 | - ); |
120 | - |
121 | + 'begin' => $pb_begin1.$pb_begin2, |
122 | + 'end' => $pb_end, |
123 | + ); |
124 | |
125 | case 'CollectionList': |
126 | // Template for a list of Collections (Blogs) |
127 | @@ -746,84 +740,76 @@ |
128 | 'page_url' => '', // All generated links will refer to the current page |
129 | 'before' => '<div class="results">', |
130 | 'header_start' => '<div class="results_nav">', |
131 | - 'header_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$', |
132 | - 'header_text_single' => '', |
133 | + 'header_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$', |
134 | + 'header_text_single' => '', |
135 | 'header_end' => '</div>', |
136 | - 'list_start' => '<table class="grouped" cellspacing="0">'."\n\n", |
137 | - 'head_start' => "<thead>\n", |
138 | - 'head_title' => '<tr><th colspan="$nb_cols$" class="title"><span style="float:right">$global_icons$</span>$title$</th>' |
139 | - ."\n</tr>\n", |
140 | - 'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">', |
141 | - 'filters_end' => '</td></tr>', |
142 | - 'line_start_head' => '<tr>', // TODO: fusionner avec colhead_start_first; mettre a jour admin_UI_general; utiliser colspan="$headspan$" |
143 | - 'colhead_start' => '<th $class_attrib$>', |
144 | - 'colhead_start_first' => '<th class="firstcol $class$">', |
145 | - 'colhead_start_last' => '<th class="lastcol $class$">', |
146 | - 'colhead_end' => "</th>\n", |
147 | - 'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="'.T_('Ascending order') |
148 | - .'" height="12" width="11" />', |
149 | - 'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="'.T_('Ascending order') |
150 | - .'" height="12" width="11" />', |
151 | - 'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="'.T_('Descending order') |
152 | - .'" height="12" width="11" />', |
153 | - 'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="'.T_('Descending order') |
154 | - .'" height="12" width="11" />', |
155 | - 'basic_sort_off' => '', |
156 | - 'basic_sort_asc' => get_icon( 'ascending' ), |
157 | - 'basic_sort_desc' => get_icon( 'descending' ), |
158 | - 'head_end' => "</thead>\n\n", |
159 | - 'tfoot_start' => "<tfoot>\n", |
160 | - 'tfoot_end' => "</tfoot>\n\n", |
161 | - 'body_start' => "<tbody>\n", |
162 | - 'line_start' => '<tr class="even">'."\n", |
163 | - 'line_start_odd' => '<tr class="odd">'."\n", |
164 | - 'line_start_last' => '<tr class="even lastline">'."\n", |
165 | - 'line_start_odd_last' => '<tr class="odd lastline">'."\n", |
166 | - 'col_start' => '<td $class_attrib$>', |
167 | - 'col_start_first' => '<td class="firstcol $class$">', |
168 | - 'col_start_last' => '<td class="lastcol $class$">', |
169 | - 'col_end' => "</td>\n", |
170 | - 'line_end' => "</tr>\n\n", |
171 | - 'grp_line_start' => '<tr class="group">'."\n", |
172 | - 'grp_line_start_odd' => '<tr class="odd">'."\n", |
173 | - 'grp_line_start_last' => '<tr class="lastline">'."\n", |
174 | - 'grp_line_start_odd_last' => '<tr class="odd lastline">'."\n", |
175 | - 'grp_col_start' => '<td $class_attrib$ $colspan_attrib$>', |
176 | - 'grp_col_start_first' => '<td class="firstcol $class$" $colspan_attrib$>', |
177 | - 'grp_col_start_last' => '<td class="lastcol $class$" $colspan_attrib$>', |
178 | - 'grp_col_end' => "</td>\n", |
179 | - 'grp_line_end' => "</tr>\n\n", |
180 | - 'body_end' => "</tbody>\n\n", |
181 | - 'total_line_start' => '<tr class="total">'."\n", |
182 | - 'total_col_start' => '<td $class_attrib$>', |
183 | - 'total_col_start_first' => '<td class="firstcol $class$">', |
184 | - 'total_col_start_last' => '<td class="lastcol $class$">', |
185 | - 'total_col_end' => "</td>\n", |
186 | - 'total_line_end' => "</tr>\n\n", |
187 | + 'list_start' => '', |
188 | + 'head_start' => '', |
189 | + 'head_title' => '<div class="fieldset_title">$global_icons$$title$</div>'."\n\n".'<table class="grouped" cellspacing="0">'."\n<thead>\n", |
190 | + 'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">', |
191 | + 'filters_end' => '</td></tr>', |
192 | + 'line_start_head' => '<tr class="clickable_headers">', // TODO: fusionner avec colhead_start_first; mettre a jour admin_UI_general; utiliser colspan="$headspan$" |
193 | + 'colhead_start' => '<th $class_attrib$>', |
194 | + 'colhead_start_first' => '<th class="firstcol $class$">', |
195 | + 'colhead_start_last' => '<th class="lastcol $class$">', |
196 | + 'colhead_end' => "</th>\n", |
197 | + 'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="'.T_('Ascending order').'" height="12" width="11" />', |
198 | + 'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="'.T_('Ascending order').'" height="12" width="11" />', |
199 | + 'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="'.T_('Descending order').'" height="12" width="11" />', |
200 | + 'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="'.T_('Descending order').'" height="12" width="11" />', |
201 | + 'basic_sort_off' => '', |
202 | + 'basic_sort_asc' => get_icon( 'ascending' ), |
203 | + 'basic_sort_desc' => get_icon( 'descending' ), |
204 | + 'head_end' => "</thead>\n\n", |
205 | + 'tfoot_start' => "<tfoot>\n", |
206 | + 'tfoot_end' => "</tfoot>\n\n", |
207 | + 'body_start' => "<tbody>\n", |
208 | + 'line_start' => '<tr class="even">'."\n", |
209 | + 'line_start_odd' => '<tr class="odd">'."\n", |
210 | + 'line_start_last' => '<tr class="even lastline">'."\n", |
211 | + 'line_start_odd_last' => '<tr class="odd lastline">'."\n", |
212 | + 'col_start' => '<td $class_attrib$>', |
213 | + 'col_start_first' => '<td class="firstcol $class$">', |
214 | + 'col_start_last' => '<td class="lastcol $class$">', |
215 | + 'col_end' => "</td>\n", |
216 | + 'line_end' => "</tr>\n\n", |
217 | + 'grp_line_start' => '<tr class="group">'."\n", |
218 | + 'grp_line_start_odd' => '<tr class="odd">'."\n", |
219 | + 'grp_line_start_last' => '<tr class="lastline">'."\n", |
220 | + 'grp_line_start_odd_last' => '<tr class="odd lastline">'."\n", |
221 | + 'grp_col_start' => '<td $class_attrib$ $colspan_attrib$>', |
222 | + 'grp_col_start_first' => '<td class="firstcol $class$" $colspan_attrib$>', |
223 | + 'grp_col_start_last' => '<td class="lastcol $class$" $colspan_attrib$>', |
224 | + 'grp_col_end' => "</td>\n", |
225 | + 'grp_line_end' => "</tr>\n\n", |
226 | + 'body_end' => "</tbody>\n\n", |
227 | + 'total_line_start' => '<tr class="total">'."\n", |
228 | + 'total_col_start' => '<td $class_attrib$>', |
229 | + 'total_col_start_first' => '<td class="firstcol $class$">', |
230 | + 'total_col_start_last' => '<td class="lastcol $class$">', |
231 | + 'total_col_end' => "</td>\n", |
232 | + 'total_line_end' => "</tr>\n\n", |
233 | 'list_end' => "</table>\n\n", |
234 | 'footer_start' => '<div class="results_nav">', |
235 | 'footer_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$' |
236 | - /* T_('Page $scroll_list$ out of $total_pages$ $prev$ | $next$<br />'. */ |
237 | - /* '<strong>$total_pages$ Pages</strong> : $prev$ $list$ $next$' */ |
238 | - /* .' <br />$first$ $list_prev$ $list$ $list_next$ $last$ :: $prev$ | $next$') */, |
239 | + /* T_('Page $scroll_list$ out of $total_pages$ $prev$ | $next$<br />'. */ |
240 | + /* '<strong>$total_pages$ Pages</strong> : $prev$ $list$ $next$' */ |
241 | + /* .' <br />$first$ $list_prev$ $list$ $list_next$ $last$ :: $prev$ | $next$') */, |
242 | 'footer_text_single' => '', |
243 | 'footer_text_no_limit' => '', // Text if theres no LIMIT and therefor only one page anyway |
244 | - 'prev_text' => T_('Previous'), |
245 | - 'next_text' => T_('Next'), |
246 | - 'no_prev_text' => '', |
247 | - 'no_next_text' => '', |
248 | - 'list_prev_text' => T_('...'), |
249 | - 'list_next_text' => T_('...'), |
250 | - 'list_span' => 11, |
251 | - 'scroll_list_range' => 5, |
252 | + 'prev_text' => T_('Previous'), |
253 | + 'next_text' => T_('Next'), |
254 | + 'no_prev_text' => '', |
255 | + 'no_next_text' => '', |
256 | + 'list_prev_text' => T_('...'), |
257 | + 'list_next_text' => T_('...'), |
258 | + 'list_span' => 11, |
259 | + 'scroll_list_range' => 5, |
260 | 'footer_end' => "</div>\n\n", |
261 | - 'no_results_start' => '<table class="grouped" cellspacing="0">'."\n\n" |
262 | - .'<tr><th class="title"><span style="float:right">$global_icons$</span>' |
263 | - .'$title$</th></tr>'."\n", |
264 | - 'no_results_end' => '<tr class="lastline"><td class="firstcol lastcol">$no_results$</td></tr>' |
265 | - .'</table>'."\n\n", |
266 | - 'after' => '</div>', |
267 | - 'sort_type' => 'basic' |
268 | + 'no_results_start' => '<div class="fieldset_title">$global_icons$$title$</div>'."\n\n".'<table class="grouped" cellspacing="0">'."\n", |
269 | + 'no_results_end' => '<tr class="lastline"><td class="firstcol lastcol">$no_results$</td></tr>'.'</table>'."\n\n", |
270 | + 'after' => '</div>', |
271 | + 'sort_type' => 'basic' |
272 | ); |
273 | |
274 | case 'compact_results': |
275 | @@ -931,16 +917,37 @@ |
276 | ); |
277 | |
278 | case 'compact_form': |
279 | + // Compact Form settings: |
280 | + return array( |
281 | + 'layout' => 'chicago', // Temporary dirty hack |
282 | + 'formstart' => '<div class="fieldset_title">', |
283 | + 'title_fmt' => '<div $title_attribs$>$global_icons$$title$</div></div><fieldset class="fieldset_content">'."\n", |
284 | + 'no_title_fmt' => '<div $title_attribs$>$global_icons$ </div></div><fieldset>'."\n", |
285 | + 'fieldset_begin' => '<div class="fieldset_wrapper$class$"$ID$><h2 $title_attribs$>$fieldset_title$</h2>', |
286 | + 'fieldset_end' => '</div>', |
287 | + 'fieldstart' => '<fieldset>'."\n", |
288 | + 'labelstart' => '<div class="label">', |
289 | + 'labelend' => "</div>\n", |
290 | + 'labelempty' => '<div class="label"></div>', // so that IE6 aligns DIV.input correcctly |
291 | + 'inputstart' => '<div class="input">', |
292 | + 'infostart' => '<div class="info">', |
293 | + 'inputend' => "</div>\n", |
294 | + 'fieldend' => "</fieldset>\n\n", |
295 | + 'buttonsstart' => '<fieldset><div class="input">', |
296 | + 'buttonsend' => "</div></fieldset>\n\n", |
297 | + 'formend' => '</fieldset>'."\n", |
298 | + ); |
299 | + |
300 | case 'Form': |
301 | // Default Form settings: |
302 | return array( |
303 | - 'layout' => 'fieldset', |
304 | + 'layout' => 'chicago', // Temporary dirty hack |
305 | 'formstart' => '', |
306 | - 'title_fmt' => '<span style="float:right">$global_icons$</span><h2>$title$</h2>'."\n", |
307 | - 'no_title_fmt' => '<span style="float:right">$global_icons$</span>'."\n", |
308 | - 'fieldset_begin' => '<fieldset $fieldset_attribs$>'."\n".'<legend $title_attribs$>$fieldset_title$</legend>'."\n", |
309 | - 'fieldset_end' => '</fieldset>'."\n", |
310 | - 'fieldstart' => '<fieldset $ID$>'."\n", |
311 | + 'title_fmt' => '$global_icons$<h2>$title$</h2>'."\n", |
312 | + 'no_title_fmt' => '$global_icons$'."\n", |
313 | + 'fieldstart' => '<fieldset>'."\n", |
314 | + 'fieldset_begin' => '<div class="fieldset_wrapper$class$"$ID$><div class="fieldset_title" $title_attribs$>$fieldset_title$</div><fieldset class="fieldset_content$class$"$fieldset_attribs$>'."\n", |
315 | + 'fieldset_end' => '</fieldset></div>'."\n", |
316 | 'labelstart' => '<div class="label">', |
317 | 'labelend' => "</div>\n", |
318 | 'labelempty' => '<div class="label"></div>', // so that IE6 aligns DIV.input correcctly |
319 | @@ -955,21 +962,21 @@ |
320 | |
321 | case 'file_browser': |
322 | return array( |
323 | - 'block_start' => '<div class="block_item"><h3><span style="float:right">$global_icons$</span>$title$</h3>', |
324 | - 'block_end' => '</div>', |
325 | - ); |
326 | + 'block_start' => '<div class="block_item_wrap"><div class="fieldset_title">$global_icons$$title$</div>', |
327 | + 'block_end' => '</div>', |
328 | + ); |
329 | |
330 | case 'block_item': |
331 | return array( |
332 | - 'block_start' => '<div class="block_item"><h3><span style="float:right">$global_icons$</span>$title$</h3>', |
333 | - 'block_end' => '</div>', |
334 | - ); |
335 | + 'block_start' => '<div class="block_item_wrap"><div class="fieldset_title">$global_icons$$title$</div><div class="block_item">', |
336 | + 'block_end' => '</div></div>', |
337 | + ); |
338 | |
339 | case 'side_item': |
340 | return array( |
341 | - 'block_start' => '<div class="browse_side_item"><h3><span style="float:right">$global_icons$</span>$title$</h3>', |
342 | - 'block_end' => '</div>', |
343 | - ); |
344 | + 'block_start' => '<div class="browse_side_item_wrap"><div class="fieldset_title">$global_icons$$title$</div><div class="browse_side_item">', |
345 | + 'block_end' => '</div></div>', |
346 | + ); |
347 | |
348 | default: |
349 | debug_die( 'Unknown $name for AdminUI::get_template(): '.var_export($name, true) ); |
350 | @@ -1241,22 +1248,22 @@ |
351 | */ |
352 | function get_footer_contents() |
353 | { |
354 | - global $app_footer_text, $copyright_text; |
355 | - |
356 | + global $app_footer_text, $copyright_text, $app_name, $app_homepage; |
357 | + global $rsc_url; |
358 | global $Hit; |
359 | |
360 | - $r = ''; |
361 | - |
362 | + $r = '<div class="footer">'; |
363 | if( $Hit->is_winIE() ) |
364 | { |
365 | - $r .= '<!--[if lt IE 7]> |
366 | -<div style="text-align:center; color:#f00; font-weight:bold; margin:1ex;">'. |
367 | - T_('WARNING: Internet Explorer 6 may not able to display this admin template properly. We strongly recommend you upgrade to IE 7 or Firefox.').'</div> |
368 | -<![endif]-->'; |
369 | + $r .= '<!--[if lt IE 7]> |
370 | +<div style="text-align:center; color:#f00; font-weight:bold;">' |
371 | +.T_('WARNING: Internet Explorer 6 may not able to display this admin template properly. We strongly recommend you upgrade to IE 7 or Firefox.') |
372 | +.'</div><![endif]-->'; |
373 | } |
374 | - |
375 | - $r .= '<div class="footer">'.$app_footer_text.' – '.$copyright_text."</div>\n\n"; |
376 | - |
377 | + $r .= '<a href="'.$app_homepage.'" class="footer_logo">'; |
378 | + $r .= '<img src="'.$rsc_url.'img/adminfooter-logo.png" alt="Powered by '.$app_name.'" width="142" height="43" longdesc="'.$app_homepage.'" /></a>'; |
379 | + $r .= '<div class="copyright">'; |
380 | + $r .= $app_footer_text.'<br />'.$copyright_text."</div></div>\n\n"; |
381 | return $r; |
382 | } |
383 | |
384 | @@ -1276,7 +1283,7 @@ |
385 | } |
386 | debug_die( 'unknown color' ); |
387 | } |
388 | - |
389 | } |
390 | |
391 | + |
392 | ?> |
393 | |
394 | === modified file 'qp_view_admin/chicago/_adminUI.class.php' |
395 | --- qp_view_admin/chicago/_adminUI.class.php 2010-08-13 09:56:20 +0000 |
396 | +++ qp_view_admin/chicago/_adminUI.class.php 2010-12-18 18:32:59 +0000 |
397 | @@ -1,6 +1,7 @@ |
398 | <?php |
399 | /** |
400 | * This file implements the Admin UI class. |
401 | + * |
402 | * Alternate admin templates should derive from this class. |
403 | * |
404 | * This file is part of the Quam Plures project - {@link http://quamplures.net/}. |
405 | @@ -113,212 +114,10 @@ |
406 | $r .= '<a href="'.$app_homepage.'" class="footer_logo">'; |
407 | $r .= '<img src="'.$rsc_url.'img/adminfooter-logo.png" alt="Powered by '.$app_name.'" width="142" height="43" longdesc="'.$app_homepage.'" /></a>'; |
408 | $r .= '<div class="copyright">'; |
409 | - $r .= $app_footer_text.' – '.$copyright_text."</div></div>\n\n"; |
410 | + $r .= $app_footer_text.'<br />'.$copyright_text."</div></div>\n\n"; |
411 | return $r; |
412 | } |
413 | |
414 | - |
415 | - /** |
416 | - * Get a template by name and depth. |
417 | - * |
418 | - * Templates can handle multiple depth levels |
419 | - * |
420 | - * This is a method (and not a member array) to allow dynamic generation and T_() |
421 | - * |
422 | - * @param string Name of the template ('main', 'sub') |
423 | - * @param integer Nesting level (start at 0) |
424 | - * @return array Associative array which defines layout and optionally properties. |
425 | - */ |
426 | - function get_template( $name, $depth = 0 ) |
427 | - { |
428 | - global $rsc_url; |
429 | - |
430 | - $pb_begin1 = '<div class="pblock">'; |
431 | - $pb_begin2 = '<div class="panelblock">'; |
432 | - $pb_end = '</div></div>'; |
433 | - |
434 | - switch( $name ) |
435 | - { |
436 | - case 'sub': |
437 | - // a payload block with embedded submenu |
438 | - return array( |
439 | - 'before' => '$global_icons$<div id="options"><ul>', |
440 | - 'after' => "</ul></div>\n".$pb_begin1.$pb_begin2, |
441 | - 'empty' => $pb_begin1.$pb_begin2, |
442 | - 'beforeEach' => '<li class="option">', |
443 | - 'afterEach' => '</li>', |
444 | - 'beforeEachSel' => '<li class="current">', |
445 | - 'afterEachSel' => '</li>', |
446 | - 'end' => $pb_end, // used to end payload block that opened submenu |
447 | - ); |
448 | - |
449 | - case 'block': |
450 | - // an additional payload block, anywhere after the one with the submenu. Used by disp_payload_begin()/disp_payload_end() |
451 | - return array( |
452 | - 'begin' => $pb_begin1.$pb_begin2, |
453 | - 'end' => $pb_end, |
454 | - ); |
455 | - |
456 | - case 'Results': |
457 | - // Results list: |
458 | - return array( |
459 | - 'page_url' => '', // All generated links will refer to the current page |
460 | - 'before' => '<div class="results">', |
461 | - 'header_start' => '<div class="results_nav">', |
462 | - 'header_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$', |
463 | - 'header_text_single' => '', |
464 | - 'header_end' => '</div>', |
465 | - 'list_start' => '', |
466 | - 'head_start' => '', |
467 | - 'head_title' => '<div class="fieldset_title">$global_icons$$title$</div>'."\n\n".'<table class="grouped" cellspacing="0">'."\n<thead>\n", |
468 | - 'filters_start' => '<tr class="filters"><td colspan="$nb_cols$">', |
469 | - 'filters_end' => '</td></tr>', |
470 | - 'line_start_head' => '<tr class="clickable_headers">', // TODO: fusionner avec colhead_start_first; mettre a jour admin_UI_general; utiliser colspan="$headspan$" |
471 | - 'colhead_start' => '<th $class_attrib$>', |
472 | - 'colhead_start_first' => '<th class="firstcol $class$">', |
473 | - 'colhead_start_last' => '<th class="lastcol $class$">', |
474 | - 'colhead_end' => "</th>\n", |
475 | - 'sort_asc_off' => '<img src="../admin/img/grey_arrow_up.gif" alt="A" title="'.T_('Ascending order').'" height="12" width="11" />', |
476 | - 'sort_asc_on' => '<img src="../admin/img/black_arrow_up.gif" alt="A" title="'.T_('Ascending order').'" height="12" width="11" />', |
477 | - 'sort_desc_off' => '<img src="../admin/img/grey_arrow_down.gif" alt="D" title="'.T_('Descending order').'" height="12" width="11" />', |
478 | - 'sort_desc_on' => '<img src="../admin/img/black_arrow_down.gif" alt="D" title="'.T_('Descending order').'" height="12" width="11" />', |
479 | - 'basic_sort_off' => '', |
480 | - 'basic_sort_asc' => get_icon( 'ascending' ), |
481 | - 'basic_sort_desc' => get_icon( 'descending' ), |
482 | - 'head_end' => "</thead>\n\n", |
483 | - 'tfoot_start' => "<tfoot>\n", |
484 | - 'tfoot_end' => "</tfoot>\n\n", |
485 | - 'body_start' => "<tbody>\n", |
486 | - 'line_start' => '<tr class="even">'."\n", |
487 | - 'line_start_odd' => '<tr class="odd">'."\n", |
488 | - 'line_start_last' => '<tr class="even lastline">'."\n", |
489 | - 'line_start_odd_last' => '<tr class="odd lastline">'."\n", |
490 | - 'col_start' => '<td $class_attrib$>', |
491 | - 'col_start_first' => '<td class="firstcol $class$">', |
492 | - 'col_start_last' => '<td class="lastcol $class$">', |
493 | - 'col_end' => "</td>\n", |
494 | - 'line_end' => "</tr>\n\n", |
495 | - 'grp_line_start' => '<tr class="group">'."\n", |
496 | - 'grp_line_start_odd' => '<tr class="odd">'."\n", |
497 | - 'grp_line_start_last' => '<tr class="lastline">'."\n", |
498 | - 'grp_line_start_odd_last' => '<tr class="odd lastline">'."\n", |
499 | - 'grp_col_start' => '<td $class_attrib$ $colspan_attrib$>', |
500 | - 'grp_col_start_first' => '<td class="firstcol $class$" $colspan_attrib$>', |
501 | - 'grp_col_start_last' => '<td class="lastcol $class$" $colspan_attrib$>', |
502 | - 'grp_col_end' => "</td>\n", |
503 | - 'grp_line_end' => "</tr>\n\n", |
504 | - 'body_end' => "</tbody>\n\n", |
505 | - 'total_line_start' => '<tr class="total">'."\n", |
506 | - 'total_col_start' => '<td $class_attrib$>', |
507 | - 'total_col_start_first' => '<td class="firstcol $class$">', |
508 | - 'total_col_start_last' => '<td class="lastcol $class$">', |
509 | - 'total_col_end' => "</td>\n", |
510 | - 'total_line_end' => "</tr>\n\n", |
511 | - 'list_end' => "</table>\n\n", |
512 | - 'footer_start' => '<div class="results_nav">', |
513 | - 'footer_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$' |
514 | - /* T_('Page $scroll_list$ out of $total_pages$ $prev$ | $next$<br />'. */ |
515 | - /* '<strong>$total_pages$ Pages</strong> : $prev$ $list$ $next$' */ |
516 | - /* .' <br />$first$ $list_prev$ $list$ $list_next$ $last$ :: $prev$ | $next$') */, |
517 | - 'footer_text_single' => '', |
518 | - 'footer_text_no_limit' => '', // Text if theres no LIMIT and therefor only one page anyway |
519 | - 'prev_text' => T_('Previous'), |
520 | - 'next_text' => T_('Next'), |
521 | - 'no_prev_text' => '', |
522 | - 'no_next_text' => '', |
523 | - 'list_prev_text' => T_('...'), |
524 | - 'list_next_text' => T_('...'), |
525 | - 'list_span' => 11, |
526 | - 'scroll_list_range' => 5, |
527 | - 'footer_end' => "</div>\n\n", |
528 | - 'no_results_start' => '<div class="fieldset_title">$global_icons$$title$</div>'."\n\n".'<table class="grouped" cellspacing="0">'."\n", |
529 | - 'no_results_end' => '<tr class="lastline"><td class="firstcol lastcol">$no_results$</td></tr>'.'</table>'."\n\n", |
530 | - 'after' => '</div>', |
531 | - 'sort_type' => 'basic' |
532 | - ); |
533 | - |
534 | - case 'compact_form': |
535 | - // Compact Form settings: |
536 | - return array( |
537 | - 'layout' => 'chicago', // Temporary dirty hack |
538 | - 'formstart' => '<div class="fieldset_title">', |
539 | - 'title_fmt' => '<div $title_attribs$>$global_icons$$title$</div></div><fieldset class="fieldset_content">'."\n", |
540 | - 'no_title_fmt' => '<div $title_attribs$>$global_icons$ </div></div><fieldset>'."\n", |
541 | - 'fieldset_begin' => '<div class="fieldset_wrapper$class$"$ID$><h2 $title_attribs$>$fieldset_title$</h2>', |
542 | - 'fieldset_end' => '</div>', |
543 | - 'fieldstart' => '<fieldset>'."\n", |
544 | - 'labelstart' => '<div class="label">', |
545 | - 'labelend' => "</div>\n", |
546 | - 'labelempty' => '<div class="label"></div>', // so that IE6 aligns DIV.input correcctly |
547 | - 'inputstart' => '<div class="input">', |
548 | - 'infostart' => '<div class="info">', |
549 | - 'inputend' => "</div>\n", |
550 | - 'fieldend' => "</fieldset>\n\n", |
551 | - 'buttonsstart' => '<fieldset><div class="input">', |
552 | - 'buttonsend' => "</div></fieldset>\n\n", |
553 | - 'formend' => '</fieldset>'."\n", |
554 | - ); |
555 | - |
556 | - case 'Form': |
557 | - // Default Form settings: |
558 | - return array( |
559 | - 'layout' => 'chicago', // Temporary dirty hack |
560 | - 'formstart' => '', |
561 | - 'title_fmt' => '$global_icons$<h2>$title$</h2>'."\n", |
562 | - 'no_title_fmt' => '$global_icons$'."\n", |
563 | - 'fieldstart' => '<fieldset>'."\n", |
564 | - 'fieldset_begin' => '<div class="fieldset_wrapper$class$"$ID$><div class="fieldset_title" $title_attribs$>$fieldset_title$</div><fieldset class="fieldset_content$class$"$fieldset_attribs$>'."\n", |
565 | - 'fieldset_end' => '</fieldset></div>'."\n", |
566 | - 'labelstart' => '<div class="label">', |
567 | - 'labelend' => "</div>\n", |
568 | - 'labelempty' => '<div class="label"></div>', // so that IE6 aligns DIV.input correcctly |
569 | - 'inputstart' => '<div class="input">', |
570 | - 'infostart' => '<div class="info">', |
571 | - 'inputend' => "</div>\n", |
572 | - 'fieldend' => "</fieldset>\n\n", |
573 | - 'buttonsstart' => '<fieldset><div class="input">', |
574 | - 'buttonsend' => "</div></fieldset>\n\n", |
575 | - 'formend' => '', |
576 | - ); |
577 | - |
578 | - case 'file_browser': |
579 | - return array( |
580 | - 'block_start' => '<div class="block_item_wrap"><div class="fieldset_title">$global_icons$$title$</div>', |
581 | - 'block_end' => '</div>', |
582 | - ); |
583 | - |
584 | - case 'block_item': |
585 | - return array( |
586 | - 'block_start' => '<div class="block_item_wrap"><div class="fieldset_title">$global_icons$$title$</div><div class="block_item">', |
587 | - 'block_end' => '</div></div>', |
588 | - ); |
589 | - |
590 | - case 'side_item': |
591 | - return array( |
592 | - 'block_start' => '<div class="browse_side_item_wrap"><div class="fieldset_title">$global_icons$$title$</div><div class="browse_side_item">', |
593 | - 'block_end' => '</div></div>', |
594 | - ); |
595 | - |
596 | - default: |
597 | - // Delegate to parent class: |
598 | - return parent::get_template( $name, $depth ); |
599 | - } |
600 | - } |
601 | - |
602 | - /** |
603 | - * Get colors for page elements that can't be controlled by CSS (charts) |
604 | - */ |
605 | - function get_color( $what ) |
606 | - { |
607 | - switch( $what ) |
608 | - { |
609 | - case 'payload_background': |
610 | - return 'f1f6f8'; |
611 | - break; |
612 | - } |
613 | - debug_die( 'unknown color' ); |
614 | - } |
615 | } |
616 | |
617 | - |
618 | ?> |
Could do with a few people testing this to see if they find glitches, cursory test shows it as working this end.
Approved, but I'll wait and give others chance.
¥