Changeset - 2d255bc1f133
[Not reviewed]
version_5
0 1 0
Dennis Fink - 10 years ago 2015-08-25 17:29:46
dennis.fink@c3l.lu
Move td around bridgeprogram if
1 file changed with 7 insertions and 5 deletions:
0 comments (0 inline, 0 general)
ennstatus/templates/status/macros.html
Show inline comments
 
@@ -51,53 +51,55 @@
 
{% macro create_server_table(server_type, servers) %}
 
  {% if server_type in ('exit', 'relay') %}
 
    {% set headers = ('#', 'Name', 'IP', 'IP6', 'Server Status', 'Tor Status', 'Country', 'Fingerprint', 'Last Updated <noscript>(UTC)</noscript>') %}
 
  {% else %}
 
    {% set headers = ('#', 'Name', 'Server Status', 'Tor Status', 'Country', 'Fingerprint', 'OBFS', 'FTEProxy', 'Flashproxy', 'meek', 'Last Updated <noscript>(UTC)</noscript>') %}
 
  {% endif %}
 
  <h2>{{ server_type|title }}</h2>
 
  <table class="table table-bordered table-striped sortable">
 
    <thead>
 
      <tr>
 
        {% for name in headers %}
 
          <th>{{ name|safe }}</th>
 
        {% endfor %}
 
      </tr>
 
    </thead>
 
    <tbody>
 
      {% for server in servers|sort(attribute='name')|sort(attribute='country') %}
 
      <tr {% if server.name in config['ENNSTATUS_BRIDGE_PROGRAM'] %}class="info"{% endif %}>
 
          <td>{{ loop.index }}</td>
 
          {% if server_type in ('exit', 'relay') %}
 
            <td>{{ create_name(server.name) }}</td>
 
            <td>{{ server.ip }}</td>
 
            <td>{{ server.ip6 or 'N/A' }}</td>
 
          {% else %}
 
            {% if server.name in config['ENNSTATUS_BRIDGE_PROGRAM'] %}
 
              <td><a href="{{ url_for('root.bridgeprogram') }}">{{ server.name }}</a></td>
 
            {% else %}
 
              <td>{{ server.name }}</td>
 
            {% endif %}
 
            <td>
 
              {% if server.name in config['ENNSTATUS_BRIDGE_PROGRAM'] %}
 
                <a href="{{ url_for('root.bridgeprogram') }}">{{ server.name }}</a>
 
              {% else %}
 
                {{ server.name }}
 
              {% endif %}
 
            </td>
 
          {% endif %}
 
          {% for status in (server.status, server.tor_status) %}
 
            <td>{{ colorize_status(status) }}</td>
 
          {% endfor %}
 
          <td>{{ create_country(server.country) }}</td>
 
          <td>{{ create_fingerprint(server.fingerprint, server.type) }}</td>
 
          {% if server_type == 'bridge' %}
 
            <td>{{ colorize_obfs(server.obfs) }}</td>
 
            <td>{{ colorize_obfs(server.fteproxy) }}</td>
 
            <td>{{ colorize_obfs(server.flashproxy) }}</td>
 
            <td>{{ colorize_obfs(server.meek) }}</td>
 
          {% endif %}
 
          <td>{{ create_date(server.last_updated) }}
 
          </td>
 
        </tr>
 
      {% endfor %}
 
    </tbody>
 
  </table>
 
  {% if server_type == 'bridge' %}
 
    <div class="alert alert-info alert-dismissible" role="alert">
 
      <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
 
      <p>See our <a class="alert-link" href="{{ url_for('root.bridgeprogram') }}">bridge program</a>, if you want to fund some bridges!</p>
 
    </div>
 
  {% endif %}
0 comments (0 inline, 0 general)