Dotclear

source: admin/popup_posts.php @ 557:e4ca21f50855

Revision 557:e4ca21f50855, 1.7 KB checked in by kozlika, 13 years ago (diff)

Ergo: harmonisation de la terminologie des boutons, termes plus précis quand possible. Accessibilité: fieldsets, labels…

La passe suivante pour essayer d'alléger le boulot des traducteurs…

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12
13require dirname(__FILE__).'/../inc/admin/prepend.php';
14
15dcPage::check('usage,contentadmin');
16
17$q = !empty($_GET['q']) ? $_GET['q'] : null;
18
19$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
20$nb_per_page =  10;
21
22$params = array();
23$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
24$params['no_content'] = true;
25$params['order'] = 'post_dt DESC';
26
27if ($q) {
28     $params['search'] = $q;
29}
30
31dcPage::openPopup(__('Add a link to an entry'),
32     dcPage::jsLoad('js/_posts_list.js').
33     dcPage::jsLoad('js/jsToolBar/popup_posts.js'));
34
35echo '<h2 class="page-title">'.__('Add a link to an entry').'</h2>';
36
37echo '<form action="popup_posts.php" method="get">'.
38'<p><label for="q" class="classic">'.__('Search entry:').' '.form::field('q',30,255,html::escapeHTML($q)).'</label> '.
39' <input type="submit" value="'.__('Search').'" /></p>'.
40'</form>';
41
42try {
43     $posts = $core->blog->getPosts($params);
44     $counter = $core->blog->getPosts($params,true);
45     $post_list = new adminPostMiniList($core,$posts,$counter->f(0));
46} catch (Exception $e) {
47     $core->error->add($e->getMessage());
48}
49
50echo '<div id="form-entries">'; # I know it's not a form but we just need the ID
51$post_list->display($page,$nb_per_page);
52echo '</div>';
53
54echo '<p><a class="button" href="#" id="link-insert-cancel">'.__('cancel').'</a></p>';
55
56dcPage::closePopup();
57?>
Note: See TracBrowser for help on using the repository browser.

Sites map