File: list.tt

package info (click to toggle)
libmojomojo-perl 1.11%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,496 kB
  • ctags: 927
  • sloc: perl: 14,671; sh: 148; xml: 120; makefile: 8; ruby: 6
file content (94 lines) | stat: -rw-r--r-- 3,233 bytes parent folder | download | duplicates (4)
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
[% SET title = loc('All Pages in x',  page.path) %]

[% WRAPPER page/wrapper.tt title = title %]
<div id="content">

<div id="categories">
    <strong>[%loc('Tags')%]</strong>:
    [% WHILE( tag = tags.next ) %]
        [% IF tag.tag == activetag +%]
    <b>[% tag.tag %]</b>
        [% ELSE +%]
    <a href="[% c.uri_for('list', tag.tag) %]">[% tag.tag %]</a> ([% tag.refcount %])
        [% END %]
    [% END +%]
</div>

<div id="allPages">
    <h2>[%loc('All Pages')%]</h2>
    [%loc('All pages in x listed alphabetically', page.name )%]
    <ul>
      [% FOREACH subpage IN pages +%]
        <li><a href="[% c.uri_for(subpage.path) %]">[% subpage.path %]</a> [% subpage.content.abstract %]</li>
      [% END +%]
    </ul>
    

    <p>
      [% IF pager.previous_page %]
        <a href="[% c.uri_for('/.list', {page => pager.previous_page}) %]">[% loc('Previous page') %]</a>
      [% END %]

      [% IF pager.previous_page AND pager.next_page %]
        |
      [% END %]

      [% IF pager.next_page %]
        <a href="[% c.uri_for('/.list', {page => pager.next_page}) %]">[% loc('Next page') %]</a>
      [% END %]
    </p>
  
</div>

[% IF ! activetag +%]
<div id="wantedPages">
    <h2>[%loc('Sub Page Tools')%]</h2>

    <ul id="path_links">
        <li><a href="[% c.uri_for('recent') %]">[% loc('Recent changes in x', page.path) %]</a></li>
        <li><a href="[% c.uri_for('tags') %]" title="[% loc('All tags in this path') %]">[% loc('Tags') %]</a></li>
        <li><a href="[% c.uri_for('users') %]" title="[% loc('Who wrote what') %]" accesskey="">[% loc('Authors in this path') %]</a></li>
        <li><a href="[% c.uri_for('feeds') %]" title="[% loc('Subscribe to changes by RSS') %]">[% loc('Feeds') %]</a></li>
        [%+ IF (user) %]<li><a href="[% c.uri_for('export') %]" title="[% loc('Download a zip with all the pages in this path') %]" accesskey="X" rel="nofollow">[% loc('Export') %]</a></li>[% END %]
    </ul>

    <h2>[%loc('Backlinks')%]</h2>
    [% loc('Other pages that link to this page.') %]
    [% IF backlinks.size +%]
    <ul style="margin-bottom: 10px">
      [% FOR backlink IN backlinks.list +%]
        <li>[% c.wikiword( backlink.from_page.path, base ) %]</li>
      [% END +%]
    </ul>
    [% END +%]

    <h2>[%loc('Wanted Pages')%]</h2>
    [% loc('Links to non-existent pages.') %]

  [% IF wanted.size +%]
    <ul style="margin-bottom: 10px">
      [% FOR wanted IN wanted.list +%]
        <li>
            <span class="newWikiWord">[% wanted.to_path %]<a title="[%loc('Not found. Click to create this page.')%]" href="[%c.uri_for(wanted.to_path,'.edit')%]" rel="nofollow">?</a></span>
            <span class="wantedBy">[% loc('referenced by x', wanted.from_page.path) %]</a></span>
        </li>
      [% END +%]
    </ul>
  [% END +%]

    <h2>[% loc('Orphaned Pages') %]</h2>
    [% loc('Pages to which no other pages link.') %]

  [% IF orphans.size +%]
    <ul style="margin-bottom: 35px">
      [% FOR orphan IN orphans.list %]
        <li><a href="[% c.uri_for( orphan.path) %]">[%orphan.path%]<a href="[%c.uri_for(_orphan.path,edit)%]" rel="nofollow">_</a></span></li>
      [% END +%]
    </ul>
  [% END +%]
</div>

[%+ END # !activetag +%]

</div>
[% END # WRAPPER %]