-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MPA][m] React publisher page - convert to mpa (#226)
* [MPA][m] Publisher page - convert * [MPA][m] Modified dataset method in snippets.html to work with publisher and package name * [fix][s]: Replace test_client with method call
- Loading branch information
1 parent
ca5daa4
commit aa3168d
Showing
7 changed files
with
112 additions
and
66 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
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,57 @@ | ||
{% extends "base.html" %} | ||
{% import '_snippets.html' as snippets %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="show-grid row"> | ||
<div class="col-sm-3"> | ||
<img src="https://avatars3.githubusercontent.com/u/22451011?v=3&s=200" class="img-thumbnail img-fluid"> | ||
<h1>{{ publisher.name }}</h1> | ||
{% if publisher.title %} | ||
<h4>{{ publisher.title }}</h4> | ||
{% endif %} | ||
<p><span class="fa fa-calendar"></span> {{ publisher.joined }}</p> | ||
</div> | ||
<div class="offset-sm-2 col-sm-5"> | ||
<div class="card mb-2"> | ||
<div class="card-block"> | ||
<div class="show-grid row"> | ||
<div class="col-sm-6"> | ||
<h3>Data packages</h3> | ||
</div> | ||
<div class="col-sm-6"> | ||
<div class="input-group"> | ||
<input id="publisher-package-input" type="text" class="form-control" | ||
onkeyup="dpFilterFunction()" placeholder="Search for..." /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="publisher-package-list"> | ||
{{ snippets.package_list_show(publisher.name, datapackage_list) }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block scripts %} | ||
<script> | ||
function dpFilterFunction() { | ||
var packages = document.getElementById("publisher-package-list") | ||
.getElementsByClassName("card"); | ||
var input = document.getElementById('publisher-package-input'); | ||
var filter = input.value.toLowerCase(); | ||
for (var i=0; i < packages.length; i++){ | ||
var pack = packages[i]; | ||
var a = pack.getElementsByClassName("card-title")[0].innerText.toLowerCase(); | ||
if (a.indexOf(filter) > -1){ | ||
pack.style.display = ""; | ||
} else { | ||
pack.style.display = "none"; | ||
} | ||
} | ||
} | ||
</script> | ||
{% endblock %} |
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