-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace activity page with updated version. Uses a new view and new base template for bootstrap 4. This also renders an old view and old templates obsolete, but hasn't yet removed them. A later PR should be done to clean this up.
- Loading branch information
Showing
30 changed files
with
778 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{% extends 'base-bs4.html' %} | ||
{% load static %} | ||
{% load utilities %} | ||
|
||
{% block head_title %}{{ project.name }}{% endblock %} | ||
|
||
{% block meta_description %}"{{ project.name }}" on Open Humans: {{ project.long_description }}{% endblock meta_description %} | ||
|
||
{% block main %} | ||
<div class="d-flex mt-4"> | ||
<div class="flex-grow-1 mb-3"> | ||
<div class="d-none d-sm-inline-block"> | ||
<h1>{{ project.name }}</h1> | ||
{% include 'partials/activity-info-short-bs4.html' %} | ||
</div> | ||
<div class="d-flex justify-content-center d-sm-none"> | ||
<div class="w-25 m-2"> | ||
<img class="img-fluid" src="{% static 'images/default-badge.png' %}"> | ||
</div> | ||
</div> | ||
<div class="d-flex justify-content-center d-sm-none text-center"> | ||
<h1 class="justify-content-center">{{ project.name }}</h1> | ||
</div> | ||
<div class="d-flex justify-content-center d-sm-none"> | ||
{% include 'partials/activity-info-short-bs4.html' %} | ||
</div> | ||
</div> | ||
<div class="d-none d-sm-inline-block w-25"> | ||
<img class="img-fluid max-width px-sm-1 pt-sm-1 px-md-3 pt-md-2" src="{% static 'images/default-badge.png' %}" style="max-height:10rem;"> | ||
</div> | ||
</div> | ||
<h2>About {{ project.name }}</h2> | ||
<p>{{ project.long_description|markdown }}</p> | ||
<ul class="nav nav-tabs" id="activity-panel-nav" role="tablist"> | ||
|
||
<li class="nav-item"> | ||
<a class="nav-link active" id="activity-panel-info-tab" data-toggle="tab" | ||
href="#activity-panel-info" role="tab" aria-controls="activity-panel-info" | ||
aria-selected="true">Info</a> | ||
</li> | ||
{% if project.returned_data_description or member_data_files %} | ||
<li class="nav-item"> | ||
<a class="nav-link{% if not member_data_files %} disabled{% endif %}" id="activity-panel-data-tab" data-toggle="tab" | ||
href="#activity-panel-data" role="tab" aria-controls="activity-panel-data" | ||
aria-selected="false">Data</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
<div class="tab-content mt-3" id="myTabContent"> | ||
<div class="tab-pane fade show active" id="activity-panel-info" role="tabpanel" | ||
aria-labelledby="activity-panel-info-tab"> | ||
{% include 'partials/activity-panel-info.html' %} | ||
</div> | ||
<div class="tab-pane fade" id="activity-panel-data" role="tabpanel" | ||
aria-labelledby="activity-panel-data-tab"> | ||
{% include 'partials/activity-panel-data.html' %} | ||
</div> | ||
</div> | ||
{% endblock main %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="d-flex mb-1"> | ||
<div class="pr-3"><b>Managed by:</b></div> | ||
<div> | ||
{{ project.leader }} | ||
{% if project.organization %} | ||
<br><span class="text-muted">{{ project.organization}}</span> | ||
{% endif %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% load static %} | ||
{% load utilities %} | ||
{# the "data" panel on an activity page #} | ||
<h2>Your Data</h2> | ||
<table class="table table-hover"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Filename</th> | ||
<th scope="col">Description</th> | ||
<th scope="col">Download link</th> | ||
<th scope="col">Tags</th> | ||
<th scope="col">DataTypes</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for datafile in member_data_files|dictsort:'basename' %} | ||
<tr> | ||
<td>{{ datafile.basename }}</td> | ||
<td> | ||
<small> | ||
{% if datafile.size %}<b>({{ datafile.size|filesizeformat }})</b>{% endif %} | ||
{{ datafile.description }} | ||
</small> | ||
</td> | ||
<td> | ||
<a class="btn btn-primary-hollow btn-sm" href="{% get_download_url datafile %}" download> | ||
Download</a> | ||
</td> | ||
<td> | ||
{% for tag in datafile.tags %} | ||
<span class="badge" style="background-color: #c9ecef">{{ tag }}</span> | ||
{% endfor %} | ||
</td> | ||
<td> | ||
{% for datatype in datafile.datatypes.all %} | ||
<a href="{% url 'data-management:datatypes-detail' datatype.id %}">{{ datatype.name }}</a>{% if not forloop.last %}, {% endif %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> |
Oops, something went wrong.