Remove pointless self-link

This commit is contained in:
Magnus Hoff 2017-10-24 12:59:37 +02:00
parent 5fc11abcfd
commit 628f3501a2
2 changed files with 3 additions and 18 deletions

View file

@ -249,23 +249,8 @@ impl Resource for ChangesResource {
}
}
fn author_clause(&self) -> String {
#[derive(BartDisplay)]
#[template_string=" by <a href=\"{{link}}\">{{author}}</a>"]
struct AuthorClause<'a> {
link: &'a str,
author: &'a str,
}
match self.resource.author {
Some(ref x) => AuthorClause {
link: &self.resource.query_args()
.author(Some(x.clone()))
.into_link(),
author: &x
}.to_string(),
None => "".to_owned(),
}
fn author(&self) -> Option<String> {
self.resource.author.clone()
}
fn all_articles_link(&self) -> Option<String> {

View file

@ -6,7 +6,7 @@
<article>
<p>
These are the {{^newer}}most recent{{/newer}} changes that have been
made to{{{subject_clause()}}}{{{author_clause()}}}.
made to{{{subject_clause()}}}{{#author()}} by {{.}}{{/author()}}.
</p>
<nav><ul class="dense">