18 changed files with 175 additions and 79 deletions
@ -0,0 +1,22 @@ |
|||
# Generated by Django 2.0.1 on 2018-02-28 18:43 |
|||
|
|||
from django.db import migrations, models |
|||
import django.db.models.deletion |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
initial = True |
|||
|
|||
dependencies = [ |
|||
('content', '0001_initial'), |
|||
('users', '0001_initial'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='content', |
|||
name='school_owner', |
|||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.SchoolProfile'), |
|||
), |
|||
] |
|||
@ -0,0 +1,18 @@ |
|||
<div class=" col-md-4 text-center overflow-hidden"> |
|||
<div class="card mb-4 box-shadow"> |
|||
<video controls class="card-img-top"> |
|||
<source src="{{content.file.url}}" type="video/mp4"> |
|||
</video> |
|||
<div class="card-body"> |
|||
<h2 class="display-5">{{content.name}}</h2> |
|||
<p class="lead">Contenu proposé par {{content.school_owner.group.name}}</p> |
|||
<div class="d-flex justify-content-between align-items-center"> |
|||
<div class="btn-group"> |
|||
<a class="btn btn-sm btn-outline-primary"i href="{% url "content:content-edit" content.pk %}"><i class="fa fa-edit"></i> Éditer</a> |
|||
<a class="btn btn-sm btn-outline-danger" href="{% url "content:content-delete" content.pk %}" ><i class="fa fa-trash"></i> Supprimer</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
@ -0,0 +1,21 @@ |
|||
{% extends 'base.html' %} |
|||
{% load bootstrap4 %} |
|||
|
|||
{% block content %} |
|||
<h1>{{object.group.name}}</h1> |
|||
<a class="btn btn-primary btn-sm" href="{% url 'users:edit-school' object.pk %}"> |
|||
<i class="fa fa-edit"></i> |
|||
Éditer |
|||
</a> |
|||
<a class="btn btn-success btn-sm" href="{% url 'content:content-new' %}"> |
|||
<i class="fa fa-plus"></i> |
|||
Ajouter un contenu |
|||
</a> |
|||
<br /> |
|||
<br /> |
|||
<div class="row"> |
|||
{% for content in contents %} |
|||
{% include "content/content.html" %} |
|||
{%endfor%} |
|||
</div> |
|||
{% endblock %} |
|||
Loading…
Reference in new issue