Dotclear

Changeset 995:ffd146bbe114


Ignore:
Timestamp:
11/12/12 14:33:46 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Every types of entries may be used to inserted an entry link in current edited post, fixes #1089

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_posts_list.js

    r740 r995  
    6969 
    7070$(function() { 
     71     // Entry type switcher 
     72     $('#type').change(function() { 
     73          this.form.submit(); 
     74     }); 
     75 
    7176     $('#form-entries tr.line').each(function() { 
    7277          dotclear.postExpander(this); 
  • admin/popup_posts.php

    r557 r995  
    1515dcPage::check('usage,contentadmin'); 
    1616 
     17$query_string = ''; 
    1718$q = !empty($_GET['q']) ? $_GET['q'] : null; 
    1819 
    1920$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 
    2021$nb_per_page =  10; 
     22 
     23$post_types = $core->getPostTypes(); 
     24foreach ($post_types as $k => $v) { 
     25     $type_combo[__($k)] = (string) $k; 
     26} 
     27$type = !empty($_POST['type']) ? $_POST['type'] : null; 
     28if (!$type && $q) { 
     29     // Cope with search form 
     30     $type = !empty($_GET['type']) ? $_GET['type'] : null; 
     31} 
     32if (!in_array($type, $type_combo)) { 
     33     $type = null; 
     34} 
    2135 
    2236$params = array(); 
     
    2943} 
    3044 
     45if ($type) { 
     46     $params['post_type'] = $type; 
     47} 
     48 
    3149dcPage::openPopup(__('Add a link to an entry'), 
    3250     dcPage::jsLoad('js/_posts_list.js'). 
     
    3553echo '<h2 class="page-title">'.__('Add a link to an entry').'</h2>'; 
    3654 
     55echo '<form action="popup_posts.php" method="post">'. 
     56     '<p><label for"type" class="classic">'.__('Entry type:').' '.form::combo('type',$type_combo,$type).'</label></p>'. 
     57     $core->formNonce(). 
     58     '<noscript><div><input type="submit" value="'.__('Ok').'" /></div></noscript>'. 
     59     '</form>'; 
     60 
    3761echo '<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>'; 
     62     '<p><label for="q" class="classic">'.__('Search entry:').' '.form::field('q',30,255,html::escapeHTML($q)).'</label> '. 
     63     ' <input type="submit" value="'.__('Search').'" /></p>'. 
     64     form::hidden('type',html::escapeHTML($type)). 
     65     '</form>'; 
    4166 
    4267try { 
  • locales/fr/main.po

    r988 r995  
    15321532 
    15331533msgid "Add a link to an entry" 
    1534 msgstr "Ajouter un lien vers un billet" 
     1534msgstr "Ajouter un lien vers une entrée" 
    15351535 
    15361536msgid "Search entry:" 
    1537 msgstr "Rechercher un billet :" 
     1537msgstr "Rechercher une entrée :" 
     1538 
     1539msgid "Entry type:" 
     1540msgstr "Type d'entrées :" 
     1541 
     1542msgid "post" 
     1543msgstr "billet" 
    15381544 
    15391545msgid "Search" 
     
    23192325 
    23202326msgid "Link to an entry" 
    2321 msgstr "Lien vers un billet" 
     2327msgstr "Lien vers une entrée" 
    23222328 
    23232329msgid "Activate enhanced uploader" 
  • locales/fr/plugins.po

    r994 r995  
    12731273msgstr "Si coché cette page sera active mais non listée dans le widget Pages." 
    12741274 
     1275msgid "page" 
     1276msgstr "page" 
     1277 
    12751278msgid "Pings" 
    12761279msgstr "Signalements" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map