Browse files

Moved some files into 'theme_defaults'..

  • Loading branch information...
1 parent 8431f0a commit 225b19b902894087c86991f44bb84a7bcc386764 @bobdenotter committed Dec 7, 2012
View
4 app/classes/lib.php
@@ -789,6 +789,8 @@ function getConfig()
// Add the theme folder if it exists and is readable.
if ( (substr($scripturi,0,5) != "bolt/") && (strpos($scripturi, "/bolt/") === false) && file_exists($themepath) ) {
$config['twigpath'][] = $themepath;
+ } else {
+ $config['twigpath'][] = realpath(__DIR__.'/../view');
}
// If the template path doesn't exist, attempt to set a Flash error on the dashboard.
@@ -799,7 +801,7 @@ function getConfig()
// We add these later, because the order is important: By having theme/ourtheme first,
// files in that folder will take precedence. For instance when overriding the menu template.
- $config['twigpath'][] = realpath(__DIR__.'/../view_backend');
+ $config['twigpath'][] = realpath(__DIR__.'/../theme_defaults');
$config['twigpath'][] = realpath(__DIR__.'/../extensions');
// echo "<pre>\n" . \util::var_dump($config['twigpath'], true) . "</pre>\n";
View
0 app/view/_sub_menu.twig → app/theme_defaults/_sub_menu.twig
File renamed without changes.
View
50 app/theme_defaults/_sub_pager.twig
@@ -0,0 +1,50 @@
+
+{% if "filter" in app.request.query.all|keys %}
+ {% set filter = "filter=" ~ app.request.query.all.filter ~ "&" %}
+{% else %}
+ {% set filter = "" %}
+{% endif %}
+
+{% if "order" in app.request.query.all|keys %}
+ {% set order = "order=" ~ app.request.query.all.order ~ "&" %}
+{% else %}
+ {% set order = "" %}
+{% endif %}
+
+{% set link = "?" ~ filter ~ order ~ "page=" %}
+
+{% if pager.totalpages > 1 %}
+<div class="pagination pagination-centered {{class}}">
+ <ul>
+{# 'first' and 'prev' #}
+{% if pager.current > 1 and class!="narrow" %}
+ <li><a href="{{link}}{{pager.current-1}}">&lsaquo; </a></li>
+{% endif %}
+{% if pager.current > surr+1 %}
+ <li><a href="{{link}}{{1}}">&laquo; 1</a></li>
+{% endif %}
+
+{# start with '..' if there are more than surr+1 before currentpage.. #}
+{% if pager.current > surr+2 %}
+ <li class="disabled"><a href="#">...</a></li>
+{% endif %}
+
+{% for i in max(1, pager.current-surr)..min(pager.current+surr, pager.totalpages) %}
+ <li {% if i==pager.current %}class='active'{%endif%}><a href="{{link}}{{i}}">{{i}}</a></li>
+{% endfor %}
+
+{# end with '..' if there are more than surr+1 after currentpage.. #}
+{% if pager.current < (pager.totalpages - surr - 1) %}
+ <li class="disabled"><a href="#">...</a></li>
+{% endif %}
+
+{# 'next' and 'last' #}
+{% if pager.current < pager.totalpages-surr %}
+ <li><a href="{{link}}{{pager.totalpages}}">{{pager.totalpages}} &raquo; </a></li>
+{% endif %}
+{% if pager.current < pager.totalpages and class!="narrow" %}
+ <li><a href="{{link}}{{pager.current+1}}">&rsaquo;</a></li>
+{% endif %}
+ </ul>
+</div>
+{% endif %}
View
0 theme/default/_sub_searchbox.twig → app/theme_defaults/_sub_searchbox.twig
File renamed without changes.
View
0 app/view/debugbar.twig → app/theme_defaults/debugbar.twig
File renamed without changes.
View
0 theme/default/rss.twig → app/theme_defaults/rss.twig
File renamed without changes.

0 comments on commit 225b19b

Please sign in to comment.