aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-01-05 20:00:38 +0300
committerBonfaceKilz2021-01-05 20:20:58 +0300
commitb0a3ce5ae0da2bbbc39ee2ebad57cd22393d1f5c (patch)
treea8b1aa55e3c8e571a7a45543adfcde130680e947
parentaa4b80f9dd8fbbcc2c7fb7f4869dc142fcf61ceb (diff)
downloadbh20-seq-resource-b0a3ce5ae0da2bbbc39ee2ebad57cd22393d1f5c.tar.gz
bh20-seq-resource-b0a3ce5ae0da2bbbc39ee2ebad57cd22393d1f5c.tar.lz
bh20-seq-resource-b0a3ce5ae0da2bbbc39ee2ebad57cd22393d1f5c.zip
Add extra tab to display all items
-rw-r--r--bh20simplewebuploader/static/main.css1
-rw-r--r--bh20simplewebuploader/templates/home.html71
2 files changed, 71 insertions, 1 deletions
diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css
index fbc721e..e2f0c83 100644
--- a/bh20simplewebuploader/static/main.css
+++ b/bh20simplewebuploader/static/main.css
@@ -567,6 +567,7 @@ input[name="feed-tabs"] ~ .tab {
display: none;
}
+#tab-all-items:checked ~ .tab.content-all-items,
#tab-pubmed-articles:checked ~ .tab.content-pubmed-articles,
#tab-arxiv-articles:checked ~ .tab.content-arxiv-articles,
#tab-tweets:checked ~ .tab.content-tweets,
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html
index a880f81..23f48bf 100644
--- a/bh20simplewebuploader/templates/home.html
+++ b/bh20simplewebuploader/templates/home.html
@@ -29,7 +29,9 @@
</div>
<div id="feed">
- <input name="feed-tabs" type="radio" id="tab-arxiv-articles" checked/>
+ <input name="feed-tabs" type="radio" id="tab-all-items" checked/>
+ <label for="tab-all-items">All Items</label>
+ <input name="feed-tabs" type="radio" id="tab-arxiv-articles"/>
<label for="tab-arxiv-articles">Arxiv</label>
<input name="feed-tabs" type="radio" id="tab-pubmed-articles"/>
<label for="tab-pubmed-articles">Pubmed</label>
@@ -37,6 +39,73 @@
<label for="tab-tweets">Tweets</label>
<input name="feed-tabs" type="radio" id="tab-commits"/>
<label for="tab-commits">Commits</label>
+ <ul class="tab content-all-items">
+ <!-- Begin News -->
+ {% if all_items %}
+ {% for item in all_items|sort(reverse=true, attribute="score")%}
+ <li>
+ {% if item['authors'] %}
+ <!-- Arxiv article -->
+ <p>
+ <b>[arxiv]</b>
+ <a href="{{ item['url'] }}" target="_blank">
+ {{item['title']}}
+ </a>
+ <br/>
+ <b>Authors:</b> {{ item['authors'] }}
+ <br/>
+ <b>Abstract:</b> {{ item['abstract']}}...
+ <br/>
+ <b>Submitted:</b> {{ item['submission']}}
+ </p>
+
+ {% elif item['full-authors'] %}
+ <!-- Pubmed Article -->
+ <p><b>[Pubmed]:</b>
+ <a href="https://pubmed.ncbi.nlm.nih.gov/{{ item['docsum-pmid'] }}" target="_blank"><b>Summary:</b>
+ {{ item['summary'] }}
+ </a> <br/>
+ <b>Full Authors:</b> {{ item['full-authors'] }} <br/>
+ <b>Short Authors:</b> {{ item['short-authors'] }} <br/>
+ <b>Citation:</b> {{ item['citation'] }} <br/>
+ <b>Short Journal Citation:</b> {{ item['short-journal-citation'] }} <br/>
+ </p>
+
+ {% elif item['tweet'] %}
+ <!-- Tweets -->
+ <p>
+ <b>[Tweet]:</b>
+ {{ item['tweet']|urlize(40, target="_blank")}}
+ <small>
+ <a href="{{ item['url'] }}" target="_blank">source</a></small>
+ <br/>
+ by {{ item['author'] }}
+ <br/>
+ <small>{{ item['timeposted'] }}</small>
+ </p>
+
+ {% elif item['repository-url'] %}
+ <!-- Commits -->
+ <p>
+ <b>[Commit]:</b>
+ <a href="{{ item.url }}" target="_blank">
+ {{ item.hash.split(":")[-1][:7] }}: {{ item.content }}
+ </a>
+ <br/>
+ <small>
+ <a href="{{ item['repository-url'] }}" target="_blank"> {{ item.author }}/{{ item.repository }}</a>
+ on {{ item.timeposted }}
+ </small>
+ </p>
+ {% endif %}
+ </li>
+ {%endfor%}
+
+ {% else %}
+ There are no items to display :(
+ {% endif %}
+ <!-- End News -->
+ </ul>
<ul class="tab content-arxiv-articles">
{% if arxiv_articles %}
{% for article in arxiv_articles|sort(reverse=true, attribute="score")%}