-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
175 additions
and
445 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.23 on 2019-08-14 14:10 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('base', '0027_auto_20170801_1228_squashed_0037_auto_20190222_1347'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CuratedThumbnail', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('img', models.ImageField(upload_to=b'curated_thumbs')), | ||
('resource', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='base.ResourceBase')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% extends "geonode_base.html" %} | ||
{% load i18n %} | ||
|
||
|
||
{% block body_class %}{% trans "Upload a Thumbnail" %}{% endblock %} | ||
|
||
{% block body_outer %} | ||
{% if error %} | ||
<div class="alert alert-error">{{ error }}</div> | ||
{% endif %} | ||
|
||
<div class="page-header"> | ||
<h2>{% trans "Upload a Thumbnail" %}</h2> | ||
</div> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-md-4"> | ||
|
||
<!-- current uploaded thumb --> | ||
{% if resource.curatedthumbnail %} | ||
<h5>Current thumbnail</h5> | ||
<img src='{{ resource.curatedthumbnail.img_thumbnail.url }}'></img> | ||
<form method="POST" class="post-form"> | ||
{% csrf_token %} | ||
<button type="submit" class="save btn btn-default" name="remove-thumb"> | ||
{% trans "Remove (and use auto generated thumbnail)" %}</button> | ||
</form> | ||
{% endif %} | ||
|
||
<!-- upload form --> | ||
<form method="POST" enctype="multipart/form-data" class="post-form"> | ||
{% csrf_token %} | ||
{{ form.img }} | ||
<button type="submit" class="save btn btn-default" name="upload-thumb">{% trans "Upload" %}</button> | ||
</form> | ||
|
||
</div> | ||
|
||
<div class="col-md-4"> | ||
<h5>Auto generated thumbnail</h5> | ||
<img src='{{ resource.thumbnail_url }}'></img> | ||
</div> | ||
|
||
</div> | ||
|
||
{% endblock %} |
Oops, something went wrong.