Overview
Comment:Création de page publique depuis la configuration, pour aider les gens perdus
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 676fa5202d96885218a9662b6ee7deb84ddfafd8
User & Date: bohwaz on 2017-08-03 01:09:16
Other Links: branch diff | manifest | tags
Context
2017-08-03
01:40
Modernisation code catégories check-in: 2989f0c0e4 user: bohwaz tags: dev
01:09
Création de page publique depuis la configuration, pour aider les gens perdus check-in: 676fa5202d user: bohwaz tags: dev
2017-08-02
07:23
Modernisation: suppression progressive de $_POST et Utils::post check-in: 986fdb6e0a user: bohwaz tags: dev
Changes

Modified src/templates/admin/config/site.tpl from [d24641ae98] to [64d5969a69].

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
    <script type="text/javascript">
    var doc_url = "{$admin_url}doc/skel/";
    var skel_list = {$sources|escape:json};
    var skel_current = "{$edit.file|escape:'js'}";
    </script>
    <script type="text/javascript" src="{$admin_url}static/scripts/skel_editor.js"></script>
{else}







    <div class="templatesList">
        <h3>Squelettes du site</h3>

        {if $reset_ok}
        <p class="confirm">
            Réinitialisation effectuée. Les squelettes ont été remis à jour
        </p>
        {/if}

        <form method="post" action="{$self_url}">
            <table class="list">
                <thead>
                    <tr>
                        <td class="check"></td>
                        <th>Fichier</th>
                        <td>Dernière modification</td>
                        <td></td>
                    </tr>
                </thead>
                <tbody>
                {foreach from=$sources key="source" item="local"}
                    <tr>
                        <td>{if $local && $local.dist}<input type="checkbox" name="select[]" value="{$source}" />{/if}</td>
                        <th><a href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">{$source}</a></th>
                        <td>{if $local}{$local.mtime|date_fr:'d/m/Y à H:i:s'}{else}<em>(fichier non modifié)</em>{/if}</td>
                        <td class="actions">
                            <a class="icn" href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">✎</a>
                        </td>
                    </tr>
                {/foreach}
                </tbody>
            </table>

            <p class="actions">
                Pour les squelettes sélectionnés&nbsp;:
                <input type="submit" name="reset" value="Réinitialiser" onclick="return confirm('Effacer toute modification locale et restaurer les squelettes d\'installation ?');" />
                {csrf_field key="squelettes"}
            </p>

        </form>

    </div>
{/if}

{include file="admin/_foot.tpl"}







>
>
>
>
>
>
>
|
|







<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
>
|
<
<



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
    <script type="text/javascript">
    var doc_url = "{$admin_url}doc/skel/";
    var skel_list = {$sources|escape:json};
    var skel_current = "{$edit.file|escape:'js'}";
    </script>
    <script type="text/javascript" src="{$admin_url}static/scripts/skel_editor.js"></script>
{else}

    <fieldset>
        <legend>Gérer le site public</legend>
        <p><a href="{$admin_url}wiki/creer.php?public">Créer une nouvelle page sur le site web public</a></p>
    </fieldset>

    <form method="post" action="{$self_url}">
    <fieldset class="templatesList">
        <legend>Squelettes du site</legend>

        {if $reset_ok}
        <p class="confirm">
            Réinitialisation effectuée. Les squelettes ont été remis à jour
        </p>
        {/if}


        <table class="list">
            <thead>
                <tr>
                    <td class="check"></td>
                    <th>Fichier</th>
                    <td>Dernière modification</td>
                    <td></td>
                </tr>
            </thead>
            <tbody>
            {foreach from=$sources key="source" item="local"}
                <tr>
                    <td>{if $local && $local.dist}<input type="checkbox" name="select[]" value="{$source}" />{/if}</td>
                    <th><a href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">{$source}</a></th>
                    <td>{if $local}{$local.mtime|date_fr:'d/m/Y à H:i:s'}{else}<em>(fichier non modifié)</em>{/if}</td>
                    <td class="actions">
                        <a class="icn" href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">✎</a>
                    </td>
                </tr>
            {/foreach}
            </tbody>
        </table>

        <p class="actions">
            Pour les squelettes sélectionnés&nbsp;:
            <input type="submit" name="reset" value="Réinitialiser" onclick="return confirm('Effacer toute modification locale et restaurer les squelettes d\'installation ?');" />
            {csrf_field key="squelettes"}
        </p>
    </fieldset>
    </form>


{/if}

{include file="admin/_foot.tpl"}

Modified src/www/admin/static/admin.css from [7612420068] to [05095aac5b].

697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713

714
715
716
717
718
719
720
...
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
    z-index: -1;
    padding: .3em .4em;
    background: #ff9;
    text-shadow: none;
    white-space: pre;
    box-shadow: 0px 0px 2px #000;
    text-decoration: underline;
}

table .actions .icn[title]:after {
    padding-right: 2em;
}

dl dd.actions .icn[title]:after {
    right: auto;
    left: 0;
    padding-left: 2em;

}

.icn[title]:hover:after {
    display: inline-block;
}

.num a {
................................................................................
    line-height: .8em;
    color: #666;
}

#orderFields fieldset .actions {
    display: block;
    position: absolute;
    top: .2em;
    right: 1em;
}

#orderFields fieldset .actions .icn {
    position: absolute;
}








<
<
<







>







 







|







697
698
699
700
701
702
703



704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
...
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
    z-index: -1;
    padding: .3em .4em;
    background: #ff9;
    text-shadow: none;
    white-space: pre;
    box-shadow: 0px 0px 2px #000;
    text-decoration: underline;



    padding-right: 2em;
}

dl dd.actions .icn[title]:after {
    right: auto;
    left: 0;
    padding-left: 2em;
    padding-right: 0;
}

.icn[title]:hover:after {
    display: inline-block;
}

.num a {
................................................................................
    line-height: .8em;
    color: #666;
}

#orderFields fieldset .actions {
    display: block;
    position: absolute;
    top: 1em;
    right: 1em;
}

#orderFields fieldset .actions .icn {
    position: absolute;
}

Modified src/www/admin/wiki/creer.php from [6111448da5] to [d9cf6828f1].

12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
27
28
29
        'parent'=> 'required|integer'
    ]);

    try {
        $id = $wiki->create([
            'titre'  => f('titre'),
            'parent' => $parent,

        ]);

        Utils::redirect('/admin/wiki/editer.php?id='.$id);
    }
    catch (UserException $e)
    {
        $form->addError($e->getMessage());
    }
}

$tpl->display('admin/wiki/creer.tpl');







>











12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
        'parent'=> 'required|integer'
    ]);

    try {
        $id = $wiki->create([
            'titre'  => f('titre'),
            'parent' => $parent,
            'droit_lecture' => qg('public') !== null ? Wiki::LECTURE_PUBLIC : Wiki::LECTURE_NORMAL,
        ]);

        Utils::redirect('/admin/wiki/editer.php?id='.$id);
    }
    catch (UserException $e)
    {
        $form->addError($e->getMessage());
    }
}

$tpl->display('admin/wiki/creer.tpl');