Skip to content

Commit

Permalink
fix #1995
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 18, 2016
1 parent c9e8406 commit c7106a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,7 @@ New in master
Features
--------

* Added link to raw file in listings (Issue #1995)
* New NO_DOCUTILS_TITLE_TRANSFORM (Issue #2382)
* Update options of chart directive to Pygal 2.2.3
* Pass global context to template shortcodes (Issue #2424)
Expand Down
9 changes: 6 additions & 3 deletions nikola/data/themes/base/templates/listing.tmpl
Expand Up @@ -14,10 +14,13 @@ ${ui.bar(crumbs)}
</ul>
%endif
% if code:
<h1>${title}
% if source_link:
<small><a href="${source_link}">(${messages("Source")})</a></small>
% endif
</h1>
${code}
% endif
% if source_link:
<p class="sourceline"><a href="${source_link}" id="sourcelink">${messages("Source")}</a></p>
% endif
</%block>


12 changes: 8 additions & 4 deletions nikola/data/themes/bootstrap3/templates/listing.tmpl
@@ -1,20 +1,24 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%namespace name="ui" file="crumbs.tmpl" import="bar"/>

<%block name="content">
${ui.bar(crumbs)}
%if folders or files:
<ul class="list-unstyled">
<ul>
% for name in folders:
<li><a href="${name|u}"><i class="glyphicon glyphicon-folder-open"></i> ${name|h}</a>
<li><a href="${name|u}"><i class="icon-folder-open"></i> ${name|h}</a>

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Aug 18, 2016

Member

Why?

This comment has been minimized.

Copy link
@ralsina

ralsina Aug 18, 2016

Author Member

Mistake

% endfor
% for name in files:
<li><a href="${name|u}.html"><i class="glyphicon glyphicon-file"></i> ${name|h}</a>
<li><a href="${name|u}.html"><i class="icon-file"></i> ${name|h}</a>
% endfor
</ul>
%endif
% if code:
<h1>${title}
% if source_link:
<small><a href="${source_link}">(${messages("Source")})</a></small>
% endif
</h1>
${code}
% endif
</%block>
Expand Down

0 comments on commit c7106a3

Please sign in to comment.