Added title, and changed layout

This commit is contained in:
Oly 2017-09-06 14:03:02 +01:00
parent c2efc2cae0
commit fdef48041d
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,5 @@
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.core.mail import EmailMessage from django.core.mail import EmailMessage
from django.contrib import messages from django.contrib import messages
from mhackspace.requests.forms import UserRequestForm from mhackspace.requests.forms import UserRequestForm
@ -6,6 +8,7 @@ from django.views.generic import ListView
from django.views.generic.edit import FormView from django.views.generic.edit import FormView
@method_decorator(login_required, name='dispatch')
class RequestsForm(FormView): class RequestsForm(FormView):
template_name = 'pages/requests.html' template_name = 'pages/requests.html'
form_class = UserRequestForm form_class = UserRequestForm

View File

@ -45,15 +45,20 @@
<tr> <tr>
<th scope="row"> {{ forloop.counter }} </th> <th scope="row"> {{ forloop.counter }} </th>
<td> <td>
{{ request.request_type }}
{{ request.request_type_string }} {{ request.request_type_string }}
</td> </td>
<td> <td>
{{ request.created_date }} {{ request.created_date }}
</td> </td>
<td> <td>
{{ request.description }} {{ request.title }}
</td> </td>
<td>
<button data-toggle="collapse" data-target="#expand{{forloop.counter}}" class="fa fa-expand ml-auto" ></button>
</td>
</tr>
<tr>
<td id="expand{{forloop.counter}}" colspan="5" class="collapse">{{ request.description }}</td>
</tr> </tr>
{% endfor %} {% endfor %}