Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sorting feature is added to all the tables #60

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
</title>
{% block stylesheets %}
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line duplicates the one before it. Did you mean to link to a different stylesheet?


{% endblock %}
{% block scripts %}
<script type="text/javascript" src="//tools-static.wmflabs.org/cdnjs/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="sortable.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't exist. Did you forget to commit it? Or should this be referencing a file in cdnjs?


{% endblock %}


</head>
<body>

Expand Down
4 changes: 2 additions & 2 deletions templates/contests.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</a>
</p>

<table class="table">
<table class="table" data-sortable>
<thead>
<tr>
<th>{{ msg('contest-col-header') }}</th>
Expand Down Expand Up @@ -46,7 +46,7 @@
{% endif %}

<h2>{{ msg('recently-ended-contests') }}</h2>
<table class="table">
<table class="table" data-sortable>
<tbody>
{% for contest in recent_contests %}
<tr class="
Expand Down
2 changes: 1 addition & 1 deletion templates/contests_view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<div id="scores">
<h3>{{ msg('scores') }}</h3>
{% if can_view_scores %}
<table class="table">
<table class="table" class="sortable-theme-bootstrap" data-sortable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a class attribute; any new classes should be added to that.

Also, this table is the only one with the theme applied; is that intentional?

<caption>{{ msg('scores-legend', [score_calculation_interval~'']) }}</caption>
<thead>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/contests_viewuser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<h2>{{ user.name }}</h2>

<table class="table table-condensed">
<table class="table table-condensed" data-sortable>
<thead>
<tr>
<th>{{ msg('index-page') }}</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/home.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
3) the total number of constructive <em>Contributions</em> of all sorts.
</p>

<table class="table" role="table">
<table class="table" role="table" data-sortable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for two spaces here.

<caption>Scoring system</caption>
<tr><th>Action taken</th><th>Points</th><th>Validations</th><th>Contributions</th></tr>
<tr><td>From any status to Proofread:</td><td>&nbsp;3</td><td>&nbsp;0</td><td>&nbsp;1</td></tr>
Expand Down