From bda15ff720e94e6918e3ae6d526d6dae555f6ff8 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 19 2016 09:30:39 +0000 Subject: updated the stlying for the contributions graph added teh graph to a card to match the other items on the page Also moved the code that renders this card into a macro, as it is displayed on a user's dashboard, as well as the profile page for a user. --- diff --git a/pagure/templates/_render_repo.html b/pagure/templates/_render_repo.html index 91ff11e..78ee52f 100644 --- a/pagure/templates/_render_repo.html +++ b/pagure/templates/_render_repo.html @@ -200,3 +200,18 @@ {{ pagination_link(pagetitle, page, total_page) }} {% endif %} {% endmacro %} + +{% macro render_contributions_graph(username) %} + {% if config.get('DATAGREPPER_URL') %} +
+
+ Contributions View List +
+
+ + User activity graph + +
+
+ {% endif %} +{% endmacro%} diff --git a/pagure/templates/index_auth.html b/pagure/templates/index_auth.html index 5e6cb04..7f20b83 100644 --- a/pagure/templates/index_auth.html +++ b/pagure/templates/index_auth.html @@ -11,7 +11,7 @@ {% endblock %} -{% from "_render_repo.html" import render_repos_as_card %} +{% from "_render_repo.html" import render_repos_as_card, render_contributions_graph %} {% block content %}
@@ -159,6 +159,9 @@
{% endif %} + + {{render_contributions_graph(username)}} +
@@ -180,16 +183,6 @@
- {% if config.get('DATAGREPPER_URL') %} -
-
-

Contributions

-
- - User activity graph - -
- {% endif %} {% endblock %} diff --git a/pagure/templates/user_info.html b/pagure/templates/user_info.html index cc9f402..6b49bf1 100644 --- a/pagure/templates/user_info.html +++ b/pagure/templates/user_info.html @@ -11,7 +11,7 @@ {% endblock %} -{% from "_render_repo.html" import render_repos_as_card %} +{% from "_render_repo.html" import render_repos_as_card, render_contributions_graph %} {% block content %} @@ -33,6 +33,7 @@
{{ render_repos_as_card(repos, repos_length, 'Projects', 'repopage', repopage, total_page_repos) }} {{ render_repos_as_card(forks, forks_length,'Forks', 'forkpage', forkpage, total_page_forks) }} + {{render_contributions_graph(username)}}
@@ -56,16 +57,6 @@
- {% if config.get('DATAGREPPER_URL') %} -
-
-

Contributions

-
- - User activity graph - -
- {% endif %} {% endblock %}