Mercurial > wikked
changeset 313:edefa7e66e31
Fix incorrect links in the UI for the "pages linking here" page.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 05 Oct 2014 07:48:01 -0700 |
parents | 86d6732b522a |
children | 59dd71d4a69a |
files | wikked/assets/js/wikked/models.js wikked/assets/tpl/inlinks-page.html wikked/views/read.py |
diffstat | 3 files changed, 4 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/wikked/assets/js/wikked/models.js Sun Oct 05 07:38:34 2014 -0700 +++ b/wikked/assets/js/wikked/models.js Sun Oct 05 07:48:01 2014 -0700 @@ -434,11 +434,7 @@ }); var IncomingLinksModel = exports.IncomingLinksModel = MasterPageModel.extend({ - urlRoot: '/api/inlinks/', - _onChangePath: function(path) { - IncomingLinksModel.__super__._onChangePath.apply(this, arguments); - this.set('url_read', '/#/read/' + path); - } + urlRoot: '/api/inlinks/' }); var WikiSearchModel = exports.WikiSearchModel = MasterPageModel.extend({
--- a/wikked/assets/tpl/inlinks-page.html Sun Oct 05 07:38:34 2014 -0700 +++ b/wikked/assets/tpl/inlinks-page.html Sun Oct 05 07:48:01 2014 -0700 @@ -4,7 +4,7 @@ <div class="decorator">Incoming Links</div> </header> <section> - <p>The following pages link to <a href="{{url_read}}">{{meta.title}}</a>:</p> + <p>The following pages link to <a href="{{get_read_url meta.url}}">{{meta.title}}</a>:</p> <ul> {{#each in_links}} <li>
--- a/wikked/views/read.py Sun Oct 05 07:38:34 2014 -0700 +++ b/wikked/views/read.py Sun Oct 05 07:48:01 2014 -0700 @@ -227,10 +227,7 @@ other = get_page_or_none(link, convert_url=False, fields=['url', 'title', 'meta']) if other is not None and is_page_readable(other): - links.append({ - 'url': other.url, - 'title': other.title - }) + links.append(get_page_meta(other)) else: links.append({'url': link, 'missing': True}) @@ -253,10 +250,7 @@ other = get_page_or_none(link, convert_url=False, fields=['url', 'title', 'meta']) if other is not None and is_page_readable(other): - links.append({ - 'url': link, - 'title': other.title - }) + links.append(get_page_meta(other)) else: links.append({'url': link, 'missing': True})