Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esi-data-scrapping
esi-table-data
Commits
b577fc65
Commit
b577fc65
authored
Sep 01, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix date on filter field
parent
e38a8792
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
22 deletions
+39
-22
models.py
esi/scraper/models.py
+1
-0
list_news.html
esi/templates/list_news.html
+38
-22
No files found.
esi/scraper/models.py
View file @
b577fc65
...
...
@@ -107,3 +107,4 @@ class MLData(models.Model):
class
Meta
:
db_table
=
'wp_esi_ml_data'
esi/templates/list_news.html
View file @
b577fc65
...
...
@@ -14,8 +14,17 @@
<div
class=
"actions mr-auto"
>
<form
class=
"actions-form"
method=
"get"
action=
"{% url 'list_news' %}"
>
<label>
Date:
</label>
{% if request.GET.from_date %}
<input
type=
"date"
name=
"from_date"
value=
"{{ request.GET.from_date }}"
>
{% else %}
<input
type=
"date"
name=
"from_date"
value=
"{{ date.publish_date__min }}"
>
{% endif %}
{% if request.GET.to_date %}
<input
type=
"date"
name=
"to_date"
value=
"{{ request.GET.to_date }}"
>
{% else %}
<input
type=
"date"
name=
"to_date"
value=
"{{ date.publish_date__max }}"
>
{% endif %}
<label>
Media:
</label>
<select
class=
"form-control actions-select"
name=
"media"
>
<option>
All
</option>
...
...
@@ -68,12 +77,15 @@
<th><a
class=
"text-white"
href=
"?order_by=publish_date"
>
Publish date {% if request.GET.order_by == 'publish_date' and request.GET.reverse != '1' %}
↑
{% elif request.GET.order_by == 'publish_date' and request.GET.reverse == '1' %}
↓
{% endif %}
</a></th>
{% elif request.GET.order_by == 'publish_date' and request.GET.reverse == '1' %}
↓
{% endif %}
</a>
</th>
</tr>
</thead>
<tbody>
{% if not news %}
<tr><td><h3>
Not found
</h3></td></tr>
<tr>
<td><h3>
Not found
</h3></td>
</tr>
{% endif %}
{% for i in news %}
<tr
id=
"{{ i.id }}"
>
...
...
@@ -87,9 +99,13 @@
<a
href=
"{% url 'edit_news' i.id %}"
data-type=
"edit"
class=
"action-block-edit"
><strong>
Edit
</strong></a>
<span
class=
"divider"
>
|
</span>
<span
class=
"action-block-delete"
><input
id=
"{{ i.id }}_d"
class=
"checkbox-delete"
name=
"{{ i.id }}"
type=
"radio"
><label
for=
"{{ i.id }}_d"
><strong>
Delete
</strong></label></span>
<span
class=
"action-block-delete"
><input
id=
"{{ i.id }}_d"
class=
"checkbox-delete"
name=
"{{ i.id }}"
type=
"radio"
><label
for=
"{{ i.id }}_d"
><strong>
Delete
</strong></label></span>
<span
class=
"divider"
>
|
</span>
<span
class=
"action-block-edit"
><input
id=
"{{ i.id }}_e"
class=
"checkbox-export"
name=
"{{ i.id }}"
type=
"radio"
checked
><label
for=
"{{ i.id }}_e"
><strong>
Export
</strong></label></span>
<span
class=
"action-block-edit"
><input
id=
"{{ i.id }}_e"
class=
"checkbox-export"
name=
"{{ i.id }}"
type=
"radio"
checked
><label
for=
"{{ i.id }}_e"
><strong>
Export
</strong></label></span>
{% endif %}
</div>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment