Exemple #1
0
def planning_sprint_stories_owner(request, id, story_id):
    last_post = utils.get_session_data(request) or {}

    try:
        sprint = models.Sprint.objects.get(id=id)
    except models.Sprint.DoesNotExist:
        raise Http404

    try:
        story = models.Story.objects.get(id=story_id)
    except models.Sprint.DoesNotExist:
        raise Http404

    ctx = {
        'sidebar_selected':
        'planning',
        'sprint':
        sprint,
        'story':
        story,
        'availabilities':
        sprint.availability_set.all(),
        'task_owner_formset':
        utils.init_formset(
            request,
            reverse('web.planning_sprint_stories_owner_submit',
                    args=['%sPARAM_SEPARATOR%s' % (sprint.id, story.id)]),
            forms.TaskOwnerForm, last_post,
            story.task_set.all().values()),
    }

    return render_to_response(
        'pages/planning_sprint_stories_availability.html', ctx,
        RequestContext(request))
Exemple #2
0
def planning_sprint_stories_owner(request, id, story_id):
    last_post = utils.get_session_data(request) or {}

    try:
        sprint = models.Sprint.objects.get(id=id)
    except models.Sprint.DoesNotExist:
        raise Http404

    try:
        story = models.Story.objects.get(id=story_id)
    except models.Sprint.DoesNotExist:
        raise Http404

    ctx = {
        "sidebar_selected": "planning",
        "sprint": sprint,
        "story": story,
        "availabilities": sprint.availability_set.all(),
        "task_owner_formset": utils.init_formset(
            request,
            reverse("web.planning_sprint_stories_owner_submit", args=["%sPARAM_SEPARATOR%s" % (sprint.id, story.id)]),
            forms.TaskOwnerForm,
            last_post,
            story.task_set.all().values(),
        ),
    }

    return render_to_response("pages/planning_sprint_stories_availability.html", ctx, RequestContext(request))
Exemple #3
0
def backlog_tasks(request, story_id):
    last_post = utils.get_session_data(request) or {}

    story = None
    try:
        story = models.Story.objects.get(id=story_id)
    except models.Story.DoesNotExist:
        raise Http404

    open_stories = list(models.Story.objects.filter(state="BACKLOG"))
    open_stories.sort(story_comparator)

    ctx = {
        "story": story,
        "sidebar_selected": "backlog",
        "open_stories": open_stories,
        "task_formset": utils.init_formset(
            request,
            reverse("web.backlog_tasks_submit", args=[story_id]),
            forms.TaskForm,
            last_post,
            story.task_set.all().values(),
        ),
    }

    return render_to_response("pages/tasks.html", ctx, RequestContext(request))
Exemple #4
0
def backlog_tasks(request, story_id):
    last_post = utils.get_session_data(request) or {}

    story = None
    try:
        story = models.Story.objects.get(id=story_id)
    except models.Story.DoesNotExist:
        raise Http404

    open_stories = list(models.Story.objects.filter(state='BACKLOG'))
    open_stories.sort(story_comparator)

    ctx = {
        'story':
        story,
        'sidebar_selected':
        'backlog',
        'open_stories':
        open_stories,
        'task_formset':
        utils.init_formset(
            request, reverse('web.backlog_tasks_submit', args=[story_id]),
            forms.TaskForm, last_post,
            story.task_set.all().values())
    }

    return render_to_response('pages/tasks.html', ctx, RequestContext(request))
Exemple #5
0
def planning_sprint_availability(request, id):
	last_post = utils.get_session_data(request) or {}

	try:
		sprint = models.Sprint.objects.get(id=id)
	except models.Sprint.DoesNotExist:
		raise Http404

	ctx = {
		'sidebar_selected': 'planning',
		'sprint': sprint,
	    'availability_formset': utils.init_formset(request, reverse('web.planning_sprint_availability_submit', args=[sprint.id]), forms.AvailabilityForm, last_post, sprint.availability_set.all().values())
	}

	return render_to_response('pages/planning_sprint_availability.html', ctx, RequestContext(request))
Exemple #6
0
def planning_sprint_availability(request, id):
	last_post = utils.get_session_data(request) or {}

	try:
		sprint = models.Sprint.objects.get(id=id)
	except models.Sprint.DoesNotExist:
		raise Http404

	ctx = {
		'sidebar_selected': 'planning',
		'sprint': sprint,
	    'availability_formset': utils.init_formset(request, reverse('web.planning_sprint_availability_submit', args=[sprint.id]), forms.AvailabilityForm, last_post, sprint.availability_set.all().values())
	}

	return render_to_response('pages/planning_sprint_availability.html', ctx, RequestContext(request))
Exemple #7
0
def backlog_tasks(request, story_id):
	last_post = utils.get_session_data(request) or {}

	story = None
	try:
		story = models.Story.objects.get(id=story_id)
	except models.Story.DoesNotExist:
		raise Http404

	open_stories = list(models.Story.objects.filter(state='BACKLOG'))
	open_stories.sort(story_comparator)

	ctx = {
		'story': story,
		'sidebar_selected': 'backlog',
		'open_stories': open_stories,
	    'task_formset': utils.init_formset(request, reverse('web.backlog_tasks_submit', args=[story_id]), forms.TaskForm, last_post, story.task_set.all().values())
	}

	return render_to_response('pages/tasks.html', ctx, RequestContext(request))
Exemple #8
0
def planning_sprint_availability(request, id):
    last_post = utils.get_session_data(request) or {}

    try:
        sprint = models.Sprint.objects.get(id=id)
    except models.Sprint.DoesNotExist:
        raise Http404

    ctx = {
        "sidebar_selected": "planning",
        "sprint": sprint,
        "availability_formset": utils.init_formset(
            request,
            reverse("web.planning_sprint_availability_submit", args=[sprint.id]),
            forms.AvailabilityForm,
            last_post,
            sprint.availability_set.all().values(),
        ),
    }

    return render_to_response("pages/planning_sprint_availability.html", ctx, RequestContext(request))
Exemple #9
0
def planning_sprint_stories_owner(request, id, story_id):
	last_post = utils.get_session_data(request) or {}

	try:
		sprint = models.Sprint.objects.get(id=id)
	except models.Sprint.DoesNotExist:
		raise Http404

	try:
		story = models.Story.objects.get(id=story_id)
	except models.Sprint.DoesNotExist:
		raise Http404

	ctx = {
		'sidebar_selected': 'planning',
		'sprint': sprint,
	    'story': story,
	    'availabilities': sprint.availability_set.all(),
	    'task_owner_formset': utils.init_formset(request, reverse('web.planning_sprint_stories_owner_submit', args=['%sPARAM_SEPARATOR%s' % (sprint.id, story.id)]), forms.TaskOwnerForm, last_post, story.task_set.all().values()),
	}

	return render_to_response('pages/planning_sprint_stories_availability.html', ctx, RequestContext(request))