-rw-r--r-- | htdocs/ancestry/layout.chtml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/htdocs/ancestry/layout.chtml b/htdocs/ancestry/layout.chtml index 6147d37..0c167bc 100644 --- a/htdocs/ancestry/layout.chtml +++ b/htdocs/ancestry/layout.chtml | |||
@@ -1,17 +1,41 @@ | |||
1 | % html(); return; /* vim:set ft=sitecing: */ | 1 | % html(); return; /* vim:set ft=sitecing: */ |
2 | %%derive page = "/ancestry/page.chtml"; | 2 | %%derive page = "/ancestry/page.chtml"; |
3 | <%decl> | ||
4 | #define PN_PREV(h,d,t) urlPrev=h; descPrev=d; titlePrev=t; | ||
5 | #define PN_NEXT(h,d,t) urlNext=h; descNext=d; titleNext=t; | ||
6 | </%decl> | ||
7 | %%impl #include <sitecing/util.h> | ||
3 | %%impl #include "acconfig.h" | 8 | %%impl #include "acconfig.h" |
4 | %%var bool b_svn = false; | 9 | %%var bool b_svn = false; |
10 | %%var std::string urlPrev; | ||
11 | %%var std::string descPrev; | ||
12 | %%var std::string titlePrev; | ||
13 | %%var std::string urlNext; | ||
14 | %%var std::string descNext; | ||
15 | %%var std::string titleNext; | ||
5 | <%constructor> | 16 | <%constructor> |
6 | if(strstr(PACKAGE_STRING,"svn")) | 17 | if(strstr(PACKAGE_STRING,"svn")) |
7 | b_svn = true; | 18 | b_svn = true; |
8 | </%constructor> | 19 | </%constructor> |
20 | <%method void prevnext() %> | ||
21 | % if(urlPrev.empty() && urlNext.empty()) return; | ||
22 | % if(descPrev.empty() && descNext.empty()) return; | ||
23 | <div class="prevnext"> | ||
24 | % if(!(urlPrev.empty() || descPrev.empty())) { | ||
25 | <a class="prevnext-prev" href="<% urlPrev %>" title="<% sitecing::html_escape(titlePrev.empty()?descPrev:titlePrev) %>"><% sitecing::html_escape(descPrev) %></a> | ||
26 | % } | ||
27 | % if(!(urlNext.empty() || descNext.empty())) { | ||
28 | <a class="prevnext-next" href="<% urlNext %>" title="<% sitecing::html_escape(titleNext.empty()?descNext:titleNext) %>"><% sitecing::html_escape(descNext) %></a> | ||
29 | % } | ||
30 | </div> | ||
31 | </%method> | ||
9 | <%method void body() %> | 32 | <%method void body() %> |
10 | <div id="content"> | 33 | <div id="content"> |
11 | <%code> | 34 | <%code> |
12 | if(!access(WEB_RUN_ROOT "/conf/banner_top",R_OK)) { | 35 | if(!access(WEB_RUN_ROOT "/conf/banner_top",R_OK)) { |
13 | pass_file_through(WEB_RUN_ROOT "/conf/banner_top"); | 36 | pass_file_through(WEB_RUN_ROOT "/conf/banner_top"); |
14 | } | 37 | } |
38 | prevnext(); | ||
15 | content(); | 39 | content(); |
16 | if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) { | 40 | if(b_strict && !access(WEB_RUN_ROOT "/conf/banner_bottom",R_OK)) { |
17 | pass_file_through(WEB_RUN_ROOT "/conf/banner_bottom"); | 41 | pass_file_through(WEB_RUN_ROOT "/conf/banner_bottom"); |