'''

@author: olivier.massot, 2018
'''

from django.urls import path
from django.conf.urls.static import static

from backlog import settings

from . import views


urlpatterns = [
    
    path('', views.index, name='index'),
    path('register/', views.register, name='register'),
    path('profile_update/', views.profile_update, name='profile_update'),
    path(r'change_password/', views.change_password, name='change_password'),
    path('edition/', views.backlog_editor, name='backlog_editor'),
    path('sprintend/', views.sprint_end, name='sprint_end'),
    path('sprintnew/', views.sprint_new, name='sprint_new'),
    path('stories/', views.story_index, name='story_index'),
    path('stories/<int:story_id>', views.story_details, name='story_details'),
    path('stories/create/', views.story_create, name='story_create'),
    path('stories/create/<int:epic_id>/', views.story_create, name='story_create'),
    path('stories/edit/<int:story_id>/', views.story_edit, name='story_edit'),
    path('stories/delete/<int:story_id>/', views.story_delete, name='story_delete'),
    path('stories/close/<int:story_id>/', views.story_close, name='story_close'),
    path('stories/reopen/<int:story_id>/', views.story_reopen, name='story_reopen'),
    path('stories/reaffect/<int:story_id>/', views.story_reaffect, name='story_reaffect_ajax'),
    path('epics/<int:epic_id>', views.epic_details, name='epic_details'),
    path('epics/create/', views.epic_create, name='epic_create'),
    path('epics/edit/<int:epic_id>/', views.epic_edit, name='epic_edit'),
    path('<str:from_>/edit/<int:epic_id>/', views.epic_edit, name='epic_edit'),
    path('epics/delete/<int:epic_id>/', views.epic_delete, name='epic_delete'),
    path('epics/newval/<int:epic_id>/', views.epic_value_update, name='epic_value_update'),
    path('epics/close/<int:epic_id>/', views.epic_close, name='epic_close'),
    path('epics/reopen/<int:epic_id>/', views.epic_reopen, name='epic_reopen'),
    path('reports/', views.reports, name='reports'),
    path('reports/sprints/', views.report_sprints, name='report_sprints'),
    path('reports/projects/', views.report_projects, name='report_projects'),
    path('reports/activity/', views.report_activity, name='report_activity'),
    path('comment-post/', views.comment_post, name='comment_post'),
    path('comment-edit/<int:comment_id>/', views.comment_edit, name='comment_edit'),
    path('comment-del/<int:comment_id>/', views.comment_del, name='comment_del'),
    path('search/', views.search, name='search'),
    path('notif/seen/<int:notif_id>/', views.notif_seen, name='notif_seen'),
    path('notif/allseen/', views.notif_all_seen, name='notif_all_seen'),
    path('upload/', views.md_upload_file, name='md_upload_file'),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
