From 1c3dd342b67ca30ab00c46e652c3a82a78c59239 Mon Sep 17 00:00:00 2001 From: Geert Kapteijns <ghkapteijns@gmail.com> Date: Sat, 25 Feb 2017 14:32:19 +0100 Subject: [PATCH] Remove dead references to #header_as_li. Fix variables not within tags. I had replaced ThesisLink#header_as_li with a partial template, but forgot to replace it in some places. The 'As contributor' author field contained raw variables that were not within tags. --- scipost/templates/scipost/claim_authorships.html | 2 +- scipost/templates/scipost/contributor_info.html | 2 +- scipost/templates/scipost/list.html | 3 ++- scipost/templates/scipost/personal_page.html | 2 +- scipost/templates/scipost/search.html | 2 +- scipost/templates/scipost/vet_authorship_claims.html | 2 +- theses/templates/theses/_thesislink_information.html | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scipost/templates/scipost/claim_authorships.html b/scipost/templates/scipost/claim_authorships.html index fb2e0c33e..2554bd2ed 100644 --- a/scipost/templates/scipost/claim_authorships.html +++ b/scipost/templates/scipost/claim_authorships.html @@ -63,7 +63,7 @@ <h3>Potential authorships to claim (auto-detected)</h3> <ul> {% for thesis in thesis_authorships_to_claim %} - {{ thesis.header_as_li }} + {% include 'theses/_thesislink_header_as_li.html' with thesislink=thesis %} <form action="{% url 'scipost:claim_thesis_authorship' thesis_id=thesis.id claim=1%}" method="post"> {% csrf_token %} <input type="submit" value="I am an author" /> diff --git a/scipost/templates/scipost/contributor_info.html b/scipost/templates/scipost/contributor_info.html index 1f6bde0d3..be6f2d0bb 100644 --- a/scipost/templates/scipost/contributor_info.html +++ b/scipost/templates/scipost/contributor_info.html @@ -103,7 +103,7 @@ <h3>Theses for which this Contributor is identified as an author:</h3> <ul> {% for thesis in contributor_theses %} - {{ thesis.header_as_li }} + {% include 'theses/_thesislink_header_as_li.html' with thesislink=thesis %} {% endfor %} </ul> </div> diff --git a/scipost/templates/scipost/list.html b/scipost/templates/scipost/list.html index 006f57fbf..2ef95a3dd 100644 --- a/scipost/templates/scipost/list.html +++ b/scipost/templates/scipost/list.html @@ -72,7 +72,8 @@ <h3>Theses:</h3> <ul> {% for thesislink in thesislink_search_list %} - {{ thesislink.header_as_li }} + + {% include 'theses/_thesislink_header_as_li.html' with thesislink=thesislink %} <form action="{% url 'scipost:list_add_element' list_id=list.id type='T' element_id=thesislink.id %}" method="post"> {% csrf_token %} <input class="AddItemToList" type="submit" value="Add"/> diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index be0639c3f..151c11eb9 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -471,7 +471,7 @@ <h3>Theses for which you are identified as an author:</h3> <ul> {% for thesis in own_thesislinks %} - {{ thesis.header_as_li }} + {% include 'theses/_thesislink_header_as_li.html' with thesislink=thesis %} {% endfor %} </ul> </div> diff --git a/scipost/templates/scipost/search.html b/scipost/templates/scipost/search.html index 419dcf4f4..050dbafd5 100644 --- a/scipost/templates/scipost/search.html +++ b/scipost/templates/scipost/search.html @@ -105,7 +105,7 @@ <h3>Theses:</h3> <ul> {% for thesislink in thesislink_search_list %} - {{ thesislink.header_as_li }} + {% include 'theses/_thesislink_header_as_li.html' with thesislink=thesislink %} {% endfor %} </ul> {% endif %} diff --git a/scipost/templates/scipost/vet_authorship_claims.html b/scipost/templates/scipost/vet_authorship_claims.html index a5e85d782..ba894d8b2 100644 --- a/scipost/templates/scipost/vet_authorship_claims.html +++ b/scipost/templates/scipost/vet_authorship_claims.html @@ -27,7 +27,7 @@ {{ claim.commentary.header_as_li }} {% elif claim.thesislink %} <h4>Contributor {{ claim.claimant.user.first_name }} {{ claim.claimant.user.last_name }} claims to be an author of Thesis:</h4> - {{ claim.thesislink.header_as_li }} + {% include 'theses/_thesislink_header_as_li.html' with thesislink=claim.thesislink %} {% endif %} <form action="{% url 'scipost:vet_authorship_claim' claim_id=claim.id claim=1%}" method="post"> diff --git a/theses/templates/theses/_thesislink_information.html b/theses/templates/theses/_thesislink_information.html index 1c4c0e759..93c9c91fc 100644 --- a/theses/templates/theses/_thesislink_information.html +++ b/theses/templates/theses/_thesislink_information.html @@ -12,7 +12,7 @@ {% if thesislink.author_as_cont.all %} {% for author in thesislink.author_as_cont.all %} <td><a href= {% url 'scipost:contributor_info' author.id %}> - author.user.first_name author.user.last_name + {{ author.user.first_name }} {{ author.user.last_name }} </a></td> {% endfor %} {% else %} -- GitLab