Compare commits
No commits in common. "b4bd86ed44f17431aca6f05212fd49f263b3fa2b" and "5f304b91f37373850a825ed9b4ac360a27bdf109" have entirely different histories.
b4bd86ed44
...
5f304b91f3
@ -1588,56 +1588,23 @@ body {
|
|||||||
border: none; }
|
border: none; }
|
||||||
.LP-ImageGrid__Container {
|
.LP-ImageGrid__Container {
|
||||||
gap: 10px; }
|
gap: 10px; }
|
||||||
.LP-ImageGrid__Item {
|
.LP-ImageGrid .LP-ImageGrid__Item, .LP-ImageGrid .LP-ImageGrid__Item * {
|
||||||
position: relative; }
|
|
||||||
.LP-ImageGrid__Item, .LP-ImageGrid__Item * {
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
word-break: break-all; }
|
word-break: break-all; }
|
||||||
.LP-ImageGrid__Item img {
|
.LP-ImageGrid .LP-ImageGrid__Item img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover; }
|
object-fit: cover; }
|
||||||
.LP-ImageGrid__Item--left img {
|
.LP-ImageGrid .LP-ImageGrid__Item--left img {
|
||||||
object-position: left; }
|
object-position: left; }
|
||||||
.LP-ImageGrid__Item--center img {
|
.LP-ImageGrid .LP-ImageGrid__Item--center img {
|
||||||
object-position: center; }
|
object-position: center; }
|
||||||
.LP-ImageGrid__Item--top img {
|
.LP-ImageGrid .LP-ImageGrid__Item--top img {
|
||||||
object-position: top; }
|
object-position: top; }
|
||||||
.LP-ImageGrid__Item--bottom img {
|
.LP-ImageGrid .LP-ImageGrid__Item--bottom img {
|
||||||
object-position: botom; }
|
object-position: botom; }
|
||||||
.LP-ImageGrid__Item--center img {
|
.LP-ImageGrid .LP-ImageGrid__Item--center img {
|
||||||
object-position: center; }
|
object-position: center; }
|
||||||
.LP-ImageGrid__Item--add .LP-Link {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
background: #f9f9f9; }
|
|
||||||
.LP-ImageGrid__Item--add .LP-Link .LP-Icon {
|
|
||||||
width: 35px;
|
|
||||||
height: 35px;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%); }
|
|
||||||
.LP-ImageGrid__DeleteItem {
|
|
||||||
opacity: 0.7;
|
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
right: 10px;
|
|
||||||
background-color: #C09F80;
|
|
||||||
border-radius: 50%;
|
|
||||||
height: 35px;
|
|
||||||
width: 35px; }
|
|
||||||
.LP-ImageGrid__DeleteItem .LP-Link .LP-Icon {
|
|
||||||
height: 20px;
|
|
||||||
width: 20px;
|
|
||||||
position: relative;
|
|
||||||
left: 8.33333px;
|
|
||||||
top: 8.33333px; }
|
|
||||||
.LP-ImageGrid__Item > .LP-Link:hover + .LP-ImageGrid__DeleteItem, .LP-ImageGrid__DeleteItem:hover {
|
|
||||||
visibility: visible; }
|
|
||||||
|
|
||||||
.LP-MainContainer {
|
.LP-MainContainer {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
{% extends 'global.html'%}
|
|
||||||
|
|
||||||
{% block maincontent %}
|
|
||||||
<form class="LP-Form" method="POST" enctype="multipart/form-data">
|
|
||||||
<fieldset class="LP-Form__Fieldset">
|
|
||||||
<legend class="LP-Form__Legend">Submit images to an place</legend>
|
|
||||||
{% csrf_token %}
|
|
||||||
|
|
||||||
<div class="LP-Form__Composition">
|
|
||||||
<div class="LP-Form__Field">
|
|
||||||
{% include 'partials/form/inputField.html' with field=form.filename %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="LP-Form__Composition LP-Form__Composition--buttons">
|
|
||||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
|
||||||
<button class="LP-Button">Submitt</button>
|
|
||||||
</div>
|
|
||||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
|
||||||
<a class="LP-Link" href="{% url 'place_list' %}">
|
|
||||||
<button type="button" class="LP-Button LP-Button--cancel">Cancel</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
{% endblock maincontent %}
|
|
@ -13,7 +13,6 @@ from lostplaces.views import (
|
|||||||
PlaceTagSubmitView,
|
PlaceTagSubmitView,
|
||||||
PhotoAlbumCreateView,
|
PhotoAlbumCreateView,
|
||||||
PhotoAlbumDeleteView,
|
PhotoAlbumDeleteView,
|
||||||
PlaceImageCreateView,
|
|
||||||
FlatView
|
FlatView
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -26,7 +25,6 @@ urlpatterns = [
|
|||||||
path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
|
path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
|
||||||
path('place/delete/<int:pk>/', PlaceDeleteView.as_view(), name='place_delete'),
|
path('place/delete/<int:pk>/', PlaceDeleteView.as_view(), name='place_delete'),
|
||||||
path('place/', PlaceListView.as_view(), name='place_list'),
|
path('place/', PlaceListView.as_view(), name='place_list'),
|
||||||
path('place_image/create/<int:place_id>', PlaceImageCreateView.as_view(), name='place_image_create'),
|
|
||||||
path('flat/<slug:slug>/', FlatView, name='flatpage'),
|
path('flat/<slug:slug>/', FlatView, name='flatpage'),
|
||||||
|
|
||||||
# POST-only URLs for tag submission
|
# POST-only URLs for tag submission
|
||||||
|
@ -4,4 +4,3 @@
|
|||||||
from lostplaces.views.base_views import *
|
from lostplaces.views.base_views import *
|
||||||
from lostplaces.views.views import *
|
from lostplaces.views.views import *
|
||||||
from lostplaces.views.place_views import *
|
from lostplaces.views.place_views import *
|
||||||
from lostplaces.views.place_image_views import *
|
|
@ -1,18 +0,0 @@
|
|||||||
from django.views import View
|
|
||||||
from django.shortcuts import get_object_or_404
|
|
||||||
|
|
||||||
from lostplaces.views.base_views import PlaceAssetCreateView
|
|
||||||
from lostplaces.models import PlaceImage, Place
|
|
||||||
|
|
||||||
class PlaceImageCreateView(PlaceAssetCreateView):
|
|
||||||
model = PlaceImage
|
|
||||||
fields = ['filename']
|
|
||||||
template_name = 'place_image/place_image_create.html'
|
|
||||||
success_message = 'Place Images submitted'
|
|
||||||
|
|
||||||
def post(self, request, place_id, *args, **kwargs):
|
|
||||||
place = get_object_or_404(Place, pk=place_id)
|
|
||||||
super().post(request, place_id)
|
|
||||||
self.object.place = place
|
|
||||||
self.object = self.request.user
|
|
||||||
self.object.save()
|
|
Loading…
Reference in New Issue
Block a user