Add support for editing album date

This commit is contained in:
Skia 2017-02-21 14:29:58 +01:00
parent 318c9ff9ad
commit aa93211025
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@
{% endif %}
{% endif %}
<div>
{% for a in album.children_albums.order_by('-id') %}
{% for a in album.children_albums.order_by('-date') %}
<div style="display: inline-block;">
{% if edit_mode %}
<input type="checkbox" name="file_list" value="{{ a.id }}">

View File

@ -253,7 +253,8 @@ class PictureEditForm(forms.ModelForm):
class AlbumEditForm(forms.ModelForm):
class Meta:
model = Album
fields=['name', 'file', 'parent', 'edit_groups']
fields = ['name', 'date', 'file', 'parent', 'edit_groups']
date = forms.DateField(label=_("Date"), widget=SelectDate, required=True)
parent = make_ajax_field(Album, 'parent', 'files', help_text="")
edit_groups = make_ajax_field(Album, 'edit_groups', 'groups', help_text="")
recursive = forms.BooleanField(label=_("Apply rights recursively"), required=False)