|
1 |
| -<!DOCTYPE html> |
2 |
| -<html lang="en"> |
3 |
| - <head> |
4 |
| - <!-- Required meta tags --> |
5 |
| - <meta charset="utf-8"> |
6 |
| - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
7 |
| - <!-- Bootstrap CSS --> |
8 |
| - <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> |
9 |
| - <title>Newcomers Data</title> |
10 |
| - </head> |
11 |
| - <body> |
12 |
| - <h1>The gamification leaderboard</h1> |
13 |
| - <p>Note: All the datetime is in UTC</p> |
14 |
| - <hr> |
15 |
| - <ul> |
16 |
| - {% for participant in participants %} |
17 |
| - <div class="container"> |
18 |
| - <div class="row"> |
19 |
| - <div class="col-sm-6 col-md-4"> |
20 |
| - <div class="thumbnail"> |
21 |
| - <div class="caption"> |
22 |
| - <p>Username: {{ participant.username }}</p> |
23 |
| - <p><a href="//github.com/{{ participant.username }}"> |
24 |
| - GitHub Profile</a></p> |
25 |
| - <p><a href="//gitlab.com/{{ participant.username }}"> |
26 |
| - GitLab Profile</a></p> |
27 |
| - <p><a href="//www.openhub.net/accounts/{{ participant.username }}">OpenHub Profile</a></p> |
28 |
| - <p>Score: {{ participant.score }}</p> |
29 |
| - <p>Level: {{ participant.level.name }}</p> |
30 |
| - <p>Activities Performed: |
31 |
| - {% for activity in participant.activities.all %} |
32 |
| - <p>{{ forloop.counter }}. {{ activity.name }}, performed_at: |
33 |
| - {{ activity.performed_at }} updated_at: {{ activity.updated_at }} |
34 |
| - </p> |
35 |
| - {% endfor %}{# for activity in participant.activities.all #} |
36 |
| - <p>Badges Earned: |
37 |
| - {% for badge in participant.badges.all %} |
38 |
| - <p>{{ forloop.counter }}.{{ badge.name }}</p> |
39 |
| - {% endfor %}{# for badge in participant.badges.all #} |
40 |
| - </p> |
| 1 | +{% extends 'base.html' %} |
| 2 | +{% load staticfiles %} |
| 3 | +{% block title %} |
| 4 | + Community | Gamification Leaderboard |
| 5 | +{% endblock %} |
| 6 | + |
| 7 | +{% block add_css_files %} |
| 8 | + <link rel="stylesheet" href="{% static 'css/contributors.css' %}"> |
| 9 | + <link rel="stylesheet" href="{% static 'css/meta-reviewers.css' %}"> |
| 10 | + <link rel="stylesheet" href="{% static 'css/gamification.css' %}"> |
| 11 | +{% endblock %} |
| 12 | + |
| 13 | +{% block add_js_files %} |
| 14 | + <script src="{% static 'js/contributors.js' %}"></script> |
| 15 | +{% endblock %} |
| 16 | + |
| 17 | +{% block main-content %} |
| 18 | + |
| 19 | + <div class="web-page-details apply-flex center-content"> |
| 20 | + <h3 style="padding-right: 15px">~</h3> |
| 21 | + <h3 class="page-name"> |
| 22 | + Contributors Gamification Leaderboard |
| 23 | + </h3> |
| 24 | + <h3 style="padding-left: 15px">~</h3> |
| 25 | + </div> |
| 26 | + |
| 27 | + <div class="apply-flex center-content"> |
| 28 | + <p class="container web-page-description"> |
| 29 | + The leaderboard is based upon the gamification system which automates the |
| 30 | + recognition of activities performed by community contributors. Based on activities |
| 31 | + performed, various parameters are calculated. |
| 32 | + </p> |
| 33 | + </div> |
| 34 | + |
| 35 | + <div class="contributors-section apply-flex center-content"> |
| 36 | + <div class="form-fields"> |
| 37 | + <form> |
| 38 | + <div class="input-field apply-flex center-content search-field"> |
| 39 | + <i class="fa fa-search social-icons"></i> |
| 40 | + <input id="search" type="search" autocomplete="off" placeholder="Search by username or name" required> |
| 41 | + <i class="fa fa-close social-icons"></i> |
| 42 | + </div> |
| 43 | + </form> |
| 44 | + <div class="search-results"> |
| 45 | + <table> |
| 46 | + <thead> |
| 47 | + <tr> |
| 48 | + <th>Search Results</th> |
| 49 | + </tr> |
| 50 | + </thead> |
| 51 | + <tbody class="search-results-tbody large-font"> |
| 52 | + <tr> |
| 53 | + <td> |
| 54 | + No results found! |
| 55 | + </td> |
| 56 | + </tr> |
| 57 | + </tbody> |
| 58 | + </table> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + |
| 63 | + <div class="contributors-cards column-flex"> |
| 64 | + {% for contributor in gamification_results %} |
| 65 | + <div class="contributor-card meta-reviewer gamifier-card apply-flex" login="{{ contributor.username }}"> |
| 66 | + <div class="contributor-image meta-reviewer-image gamifier-image"> |
| 67 | + <img src="//github.com/{{ contributor.username }}.png/?size=400" |
| 68 | + alt="user-image"> |
| 69 | + <div class="bottom-center large-font bold-text social-links"> |
| 70 | + <a href="//github.com/{{ contributor.username }}" target="_blank"> |
| 71 | + <i class="fa fa-github github-icon social-icons" aria-hidden="true"></i> |
| 72 | + </a> |
| 73 | + <a href="//gitlab.com/{{ contributor.username }}" target="_blank"> |
| 74 | + <i class="fa fa-gitlab social-icons gitlab-icon" aria-hidden="true"></i> |
| 75 | + </a> |
| 76 | + <a href="//www.openhub.net/accounts/{{ contributor.username }}" target="_blank" class="social-icons">OH</a> |
| 77 | + </div> |
| 78 | + </div> |
| 79 | + <div class="gamifier-details"> |
| 80 | + <div class="gamifier-details-part-1 column-flex"> |
| 81 | + <div class="column-flex large-font gray-font-color"> |
| 82 | + <span> |
| 83 | + <b>Username:</b> |
| 84 | + {{ contributor.username }} |
| 85 | + </span> |
| 86 | + <span> |
| 87 | + <b>Score:</b> |
| 88 | + {{ contributor.score }} |
| 89 | + </span> |
| 90 | + <span> |
| 91 | + <b>Level:</b> |
| 92 | + {{ contributor.level.name }} |
| 93 | + </span> |
| 94 | + <div> |
| 95 | + {% if contributor.badges.all %} |
| 96 | + <b>Badges Earned:</b> |
| 97 | + <div class="column-flex"> |
| 98 | + {% for badge in contributor.badges.all %} |
| 99 | + <span> |
| 100 | + <b>-></b> |
| 101 | + {{ badge.name }} |
| 102 | + </span> |
| 103 | + {% endfor %}{# for badge in contributor.badges.all #} |
41 | 104 | </div>
|
| 105 | + {% else %}{# if contributor.badges.all #} |
| 106 | + <span> |
| 107 | + <b>No badges earned!<i class="fa fa-frown-o"></i></b> |
| 108 | + </span> |
| 109 | + {% endif %}{# if contributor.badges.all #} |
| 110 | + </div> |
| 111 | + <div class="column-flex"> |
| 112 | + <b>Some Activities permormed:</b> |
| 113 | + {% for activity in contributor.activities.all|slice:":2" %} |
| 114 | + <span> |
| 115 | + <b>{{ forloop.counter }}.</b> {{ activity.name }}, on {{ activity.performed_at }} |
| 116 | + </span> |
| 117 | + {% endfor %}{# for activity in contributor.activities.all|slice:":2" #} |
42 | 118 | </div>
|
43 | 119 | </div>
|
44 | 120 | </div>
|
| 121 | + |
| 122 | + {% if contributor.activities.all|slice:"2:6" %} |
| 123 | + <div class="gamifier-details-part-2 column-flex large-font gray-font-color"> |
| 124 | + {% for activity in contributor.activities.all|slice:"2:6" %} |
| 125 | + <span> |
| 126 | + <b>{{ forloop.counter|add:2 }}.</b> {{ activity.name }}, on {{ activity.performed_at }} |
| 127 | + </span> |
| 128 | + {% endfor %}{# for activity in contributor.activities.all|slice:"2:6" #} |
| 129 | + </div> |
| 130 | + {% endif %}{# if contributor.activities.all|slice:"2:6" #} |
| 131 | + |
| 132 | + {% if contributor.activities.all|slice:"6:10" %} |
| 133 | + <div class="gamifier-details-part-3 column-flex large-font gray-font-color"> |
| 134 | + {% for activity in contributor.activities.all|slice:"6:10" %} |
| 135 | + <span> |
| 136 | + <b>{{ forloop.counter|add:6 }}.</b> {{ activity.name }}, on: {{ activity.performed_at }} |
| 137 | + </span> |
| 138 | + {% endfor %}{# for activity in contributor.activities.all|slice:"6:10" #} |
| 139 | + </div> |
| 140 | + {% endif %}{# if contributor.activities.all|slice:"6:10" #} |
45 | 141 | </div>
|
46 |
| - <hr> |
47 |
| - {% endfor %}{# for participant in participants #} |
48 |
| - </ul> |
49 |
| - </body> |
50 |
| -</html> |
| 142 | + </div> |
| 143 | + {% endfor %}{# for contributor in gamification_results #} |
| 144 | + </div> |
| 145 | + |
| 146 | +{% endblock %} |
| 147 | + |
0 commit comments