aboutsummaryrefslogtreecommitdiff
path: root/src/web/templates
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 00:00:37 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-07 00:00:37 +0200
commit181ee8dced7cccc687136c6f35faf2bff1d22d23 (patch)
tree7a2aea7553433957be0455694a7b39e91668dd42 /src/web/templates
parentcommit the session after deleting old articles. (diff)
parentFixed merge conflicts. (diff)
downloadnewspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.tar.gz
newspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.tar.bz2
newspipe-181ee8dced7cccc687136c6f35faf2bff1d22d23.zip
Fixed merge conflicts.
Diffstat (limited to 'src/web/templates')
-rw-r--r--src/web/templates/admin/dashboard.html6
-rw-r--r--src/web/templates/home.html2
-rw-r--r--src/web/templates/layout.html16
-rw-r--r--src/web/templates/management.html6
4 files changed, 12 insertions, 18 deletions
diff --git a/src/web/templates/admin/dashboard.html b/src/web/templates/admin/dashboard.html
index 57b20bb5..d6e53526 100644
--- a/src/web/templates/admin/dashboard.html
+++ b/src/web/templates/admin/dashboard.html
@@ -17,7 +17,7 @@
</tr>
</thead>
<tbody>
- {% for user in users|sort(attribute="last_seen")|reverse %}
+ {% for user in users %}
<tr {% if not user.enabled %}class="warning"{% endif %}>
<td>{{ loop.index }}</td>
<td>{{ user.nickname }}{% if user.id == current_user.id %} (It's you!){% endif %}</td>
@@ -25,7 +25,7 @@
<td class="date">{{ user.date_created | datetime }}</td>
<td class="date">{{ user.last_seen | datetime }}</td>
<td>
- <a href="{{ url_for("admin.user_form", user_id=user.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this user') }}"></i></a>
+ <a href="{{ url_for("admin.user", user_id=user.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this user') }}"></i></a>
{% if user.id != current_user.id %}
<a href="{{ url_for("admin.toggle_user", user_id=user.id) }}">
{% if user.enabled %}
@@ -34,7 +34,7 @@
<i class="glyphicon glyphicon-ok-circle" title="{{ _("Enable this account") }}"></i>
{% endif %}
</a>
- <a href="{{ url_for("admin.delete_user", user_id=user.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this user') }}" onclick="return confirm('{{ _('You are going to delete this account.') }}');"></i></a>
+ <a href="{{ url_for("admin.toggle_user", user_id=user.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this user') }}" onclick="return confirm('{{ _('You are going to delete this account.') }}');"></i></a>
{% endif %}
</td>
</tr>
diff --git a/src/web/templates/home.html b/src/web/templates/home.html
index fcb2a042..155742c5 100644
--- a/src/web/templates/home.html
+++ b/src/web/templates/home.html
@@ -7,7 +7,7 @@
<meta name="description" content="JARR is a web-based news aggregator." />
<meta name="author" content="" />
<title>JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %}</title>
- <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.png") }}" />
+ <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.ico") }}" />
<!-- Add custom CSS here -->
<link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" />
<link href="{{ url_for("static", filename="css/one-page-app.css") }}" rel="stylesheet" media="screen" />
diff --git a/src/web/templates/layout.html b/src/web/templates/layout.html
index feb370e3..50f96e8f 100644
--- a/src/web/templates/layout.html
+++ b/src/web/templates/layout.html
@@ -7,12 +7,12 @@
<meta name="description" content="JARR is a web-based news aggregator." />
<meta name="author" content="" />
<title>JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %}</title>
- <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.png") }}" />
+ <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.ico") }}" />
<!-- Bootstrap core CSS -->
<link href="{{ url_for("static", filename="css/bootstrap.min.css") }}" rel="stylesheet" media="screen" />
<!-- Add custom CSS here -->
<link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" />
- {% endblock %}
+ {% endblock %}
</head>
<body>
<nav id="jarrnav" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
@@ -35,7 +35,7 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav navbar-right">
- {% if g.user.is_authenticated %}
+ {% if current_user.is_authenticated %}
<!-- <li><a href="{{ url_for("feed.form") }}"><span class="glyphicon glyphicon-plus-sign"></span> {{ _('Add a feed') }}</a></li> -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@@ -54,17 +54,12 @@
</li>
</ul>
</li>
- {% if conf.CRAWLING_METHOD == "classic" and (not conf.ON_HEROKU or g.user.is_admin()) %}
+ {% if conf.CRAWLING_METHOD == "classic" and (not conf.ON_HEROKU or current_user.is_admin) %}
<li><a href="/fetch"><span class="glyphicon glyphicon-import"></span> {{ _('Fetch') }}</a></li>
{% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Feed') }} <b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a href="{{ url_for("feeds.update", action="read") }}">{{ _('Mark all as read') }}</a></li>
- <li><a href="{{ url_for("feeds.update", action="read", nb_days="1") }}">{{ _('Mark all as read older than yesterday') }}</a></li>
- <li><a href="{{ url_for("feeds.update", action="read", nb_days="5") }}">{{ gettext('Mark all as read older than %(days)s days', days=5) }}</a></li>
- <li><a href="{{ url_for("feeds.update", action="read", nb_days="10") }}">{{ gettext('Mark all as read older than %(days)s days', days=10) }}</a></li>
- <li role="presentation" class="divider"></li>
<li><a href="{{ url_for("feeds.inactives") }}">{{ _('Inactive') }}</a></li>
<li><a href="{{ url_for("articles.history") }}">{{ _('History') }}</a></li>
<li><a href="{{ url_for("feeds.feeds") }}">{{ _('All') }}</a></li>
@@ -76,9 +71,8 @@
</a>
<ul class="dropdown-menu">
<li><a href="{{ url_for("user.profile") }}"><span class="glyphicon glyphicon-user"></span> {{ _('Profile') }}</a></li>
- <li><a href="{{ url_for("user.management") }}"><span class="glyphicon glyphicon-cog"></span> {{ _('Your data') }}</a></li>
<li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span> {{ _('About') }}</a></li>
- {% if g.user.is_admin() %}
+ {% if current_user.is_admin %}
<li role="presentation" class="divider"></li>
<li><a href="{{ url_for("admin.dashboard") }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li>
<li role="presentation" class="divider"></li>
diff --git a/src/web/templates/management.html b/src/web/templates/management.html
index 01179b5e..dc95a052 100644
--- a/src/web/templates/management.html
+++ b/src/web/templates/management.html
@@ -14,18 +14,18 @@
<button class="btn btn-default" type="submit">OK</button>
</form>
<br />
- <a href="/export_opml" class="btn btn-default">{{ _('Export feeds to OPML') }}</a>
+ <a href="{{ url_for('articles.export', format='OPML') }}" class="btn btn-default">{{ _('Export feeds to OPML') }}</a>
<h1>{{ _('Data liberation') }}</h1>
<form action="" method="post" id="formImportJSON" enctype="multipart/form-data">
<span class="btn btn-default btn-file">{{ _('Import account') }} (<span class="text-info">*.json</span>)<input type="file" name="jsonfile" /></span>
<button class="btn btn-default" type="submit">OK</button>
</form>
<br />
- <a href="/export?format=JSON" class="btn btn-default">{{ _('Export account to JSON') }}</a>
+ <a href="{{ url_for('articles.export', format='JSON') }}" class="btn btn-default">{{ _('Export account to JSON') }}</a>
</div>
<div class="well">
<h1>{{ _('Export articles') }}</h1>
- <a href="/export?format=HTML" class="btn btn-default">HTML</a>
+ <a href="{{ url_for('articles.export', format='HTML') }}" class="btn btn-default">HTML</a>
</div>
</div><!-- /.container -->
{% endblock %}
bgstack15