diff options
author | Mike Crute <mcrute@gmail.com> | 2010-02-27 13:37:25 -0500 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2010-02-27 13:37:25 -0500 |
commit | d33473d1686a2a77bacf6eabe9275b0e5e11c83a (patch) | |
tree | 91e3401d40354c58dbb2a94bb2814d1237068a5e | |
parent | 8f24ded95c4e4e10455428aa383ce3a2453b1248 (diff) | |
parent | 4bb033a00f8c5d04086dbd10a92f1f3ca96bf5c2 (diff) | |
download | snakeplan-d33473d1686a2a77bacf6eabe9275b0e5e11c83a.tar.bz2 snakeplan-d33473d1686a2a77bacf6eabe9275b0e5e11c83a.tar.xz snakeplan-d33473d1686a2a77bacf6eabe9275b0e5e11c83a.zip |
Merging changes from benjaminws
-rw-r--r-- | snakeplan/TODO.txt | 5 | ||||
-rw-r--r-- | snakeplan/projects/urls.py | 11 | ||||
-rw-r--r-- | snakeplan/projects/views/stories.py | 4 | ||||
-rw-r--r-- | snakeplan/projects/views/tasks.py | 12 | ||||
-rw-r--r-- | snakeplan/templates/projects/iteration_list.html | 2 | ||||
-rw-r--r-- | snakeplan/templates/projects/project_list.html | 2 | ||||
-rw-r--r-- | snakeplan/templates/projects/story_detail.html | 19 | ||||
-rw-r--r-- | snakeplan/templates/projects/story_list.html | 8 | ||||
-rw-r--r-- | snakeplan/templates/projects/task_detail.html | 19 | ||||
-rwxr-xr-x | snakeplan/urls.py | 7 |
10 files changed, 77 insertions, 12 deletions
diff --git a/snakeplan/TODO.txt b/snakeplan/TODO.txt index ed43c64..06cc314 100644 --- a/snakeplan/TODO.txt +++ b/snakeplan/TODO.txt | |||
@@ -2,3 +2,8 @@ Work To Do | |||
2 | ========== | 2 | ========== |
3 | * Fix imports of snakeplan, instead place projects in the pythonpath | 3 | * Fix imports of snakeplan, instead place projects in the pythonpath |
4 | * Move templates from the application to the project | 4 | * Move templates from the application to the project |
5 | * View/Form for Logged Time (where is the relationship?) - bsmith | ||
6 | * Some sort of menu layout static across all pages (make it a model/view for flexability?) | ||
7 | * Header linking back to the main page | ||
8 | * Authentication on the user pages. | ||
9 | * UI Design -- HARDCORE BITCH | ||
diff --git a/snakeplan/projects/urls.py b/snakeplan/projects/urls.py index 6aec48a..ca1077a 100644 --- a/snakeplan/projects/urls.py +++ b/snakeplan/projects/urls.py | |||
@@ -1,10 +1,11 @@ | |||
1 | from django.conf.urls.defaults import patterns, url | 1 | from django.conf.urls.defaults import patterns, url |
2 | 2 | ||
3 | |||
4 | urlpatterns = patterns('snakeplan.projects.views', | 3 | urlpatterns = patterns('snakeplan.projects.views', |
5 | (r'^$', 'projects.index'), | 4 | (r'^$', 'projects.index'), |
6 | (r'^story/(.*)/', 'stories.index'), | 5 | (r'^projects/$', 'projects.index'), |
7 | (r'^iteration/(.*)/', 'iterations.index'), | 6 | (r'^project/create/', 'projects.create_project'), |
8 | (r'^create/', 'projects.create_project'), | 7 | (r'^project/(.*)/iterations/', 'projects.project_iterations'), |
9 | url(r'^(.*)/', 'projects.project_iterations', name='project_iterations'), | 8 | (r'^iteration/(.*)/stories/', 'iterations.index'), |
9 | (r'^story/(.*)/tasks/', 'stories.index'), | ||
10 | (r'^task/(.*)/', 'tasks.index'), | ||
10 | ) | 11 | ) |
diff --git a/snakeplan/projects/views/stories.py b/snakeplan/projects/views/stories.py index 39bc323..504d930 100644 --- a/snakeplan/projects/views/stories.py +++ b/snakeplan/projects/views/stories.py | |||
@@ -1,10 +1,14 @@ | |||
1 | from django.views.generic import list_detail | 1 | from django.views.generic import list_detail |
2 | from snakeplan.projects.models import Story | 2 | from snakeplan.projects.models import Story |
3 | from snakeplan.projects.models import Task | ||
3 | 4 | ||
4 | 5 | ||
5 | def index(request, story_id): | 6 | def index(request, story_id): |
7 | tasks = Task.objects.filter(story=story_id).all() | ||
8 | |||
6 | return list_detail.object_detail( | 9 | return list_detail.object_detail( |
7 | request=request, | 10 | request=request, |
8 | queryset=Story.objects.filter(id=story_id).all(), | 11 | queryset=Story.objects.filter(id=story_id).all(), |
9 | object_id=story_id, | 12 | object_id=story_id, |
13 | extra_context={'tasks': tasks}, | ||
10 | ) | 14 | ) |
diff --git a/snakeplan/projects/views/tasks.py b/snakeplan/projects/views/tasks.py new file mode 100644 index 0000000..8e74cfa --- /dev/null +++ b/snakeplan/projects/views/tasks.py | |||
@@ -0,0 +1,12 @@ | |||
1 | from django.views.generic import list_detail | ||
2 | import snakeplan.projects.models as sp_models | ||
3 | from snakeplan.projects.models import Task | ||
4 | |||
5 | |||
6 | def index(request, task_id): | ||
7 | return list_detail.object_detail( | ||
8 | request=request, | ||
9 | queryset=Task.objects.filter(id=task_id).all(), | ||
10 | object_id=task_id, | ||
11 | extra_context={'dispositions': sp_models.DISPOSITIONS} | ||
12 | ) | ||
diff --git a/snakeplan/templates/projects/iteration_list.html b/snakeplan/templates/projects/iteration_list.html index cb39fc7..f48b812 100644 --- a/snakeplan/templates/projects/iteration_list.html +++ b/snakeplan/templates/projects/iteration_list.html | |||
@@ -14,7 +14,7 @@ | |||
14 | </tr> | 14 | </tr> |
15 | {% for iteration in object_list %} | 15 | {% for iteration in object_list %} |
16 | <tr> | 16 | <tr> |
17 | <td><a href="/iteration/{{iteration.id}}">{{iteration.name}}</a></td> | 17 | <td><a href="/p/iteration/{{iteration.id}}/stories/">{{iteration.name}}</a></td> |
18 | <td>{{iteration.description}}</td> | 18 | <td>{{iteration.description}}</td> |
19 | <td>{{iteration.start_date}}</td> | 19 | <td>{{iteration.start_date}}</td> |
20 | <td>{{iteration.end_date}}</td> | 20 | <td>{{iteration.end_date}}</td> |
diff --git a/snakeplan/templates/projects/project_list.html b/snakeplan/templates/projects/project_list.html index 3b8ddee..331d7c2 100644 --- a/snakeplan/templates/projects/project_list.html +++ b/snakeplan/templates/projects/project_list.html | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | <ol> | 6 | <ol> |
7 | {% for project in object_list %} | 7 | {% for project in object_list %} |
8 | <li><a href="{{project.id}}">{{project.name}}</a></li> | 8 | <li><a href="/p/project/{{project.id}}/iterations/">{{project.name}}</a></li> |
9 | {% endfor %} | 9 | {% endfor %} |
10 | </ol> | 10 | </ol> |
11 | {% endblock %} | 11 | {% endblock %} |
diff --git a/snakeplan/templates/projects/story_detail.html b/snakeplan/templates/projects/story_detail.html index f8ade89..4e73397 100644 --- a/snakeplan/templates/projects/story_detail.html +++ b/snakeplan/templates/projects/story_detail.html | |||
@@ -1,5 +1,20 @@ | |||
1 | <h1>{{ object.name }}</h1> | 1 | {% extends "base.html" %} |
2 | |||
3 | {% block content %} | ||
4 | |||
5 | <h1>Story: {{ object.name }}</h1> | ||
6 | |||
7 | <h2>Descipton:</h2> | ||
8 | <p class="story_description">{{ object.description }}</p> | ||
9 | |||
10 | <h2>Tasks:</h2> | ||
2 | 11 | ||
3 | <ol> | 12 | <ol> |
4 | <li> {{ object }} </li> | 13 | {% for task in tasks %} |
14 | <li> | ||
15 | <a href="/p/task/{{ task.id }}/">{{ task.name }}</a> | ||
16 | </li> | ||
17 | {% endfor %} | ||
5 | </ol> | 18 | </ol> |
19 | |||
20 | {% endblock %} | ||
diff --git a/snakeplan/templates/projects/story_list.html b/snakeplan/templates/projects/story_list.html index 4424ac4..f606cc5 100644 --- a/snakeplan/templates/projects/story_list.html +++ b/snakeplan/templates/projects/story_list.html | |||
@@ -1,8 +1,14 @@ | |||
1 | {% extends "base.html" %} | ||
2 | |||
3 | {% block content %} | ||
4 | |||
1 | <h1>Iteration: {{ iteration_name }}</h1> | 5 | <h1>Iteration: {{ iteration_name }}</h1> |
2 | 6 | ||
3 | <h2>Stories</h2> | 7 | <h2>Stories</h2> |
4 | <ol> | 8 | <ol> |
5 | {% for story in object_list %} | 9 | {% for story in object_list %} |
6 | <li><a href="/project/story/{{story.id}}/">{{story.name}}</a></li> | 10 | <li><a href="/p/story/{{story.id}}/tasks/">{{story.name}}</a></li> |
7 | {% endfor %} | 11 | {% endfor %} |
8 | </ol> | 12 | </ol> |
13 | |||
14 | {% endblock %} | ||
diff --git a/snakeplan/templates/projects/task_detail.html b/snakeplan/templates/projects/task_detail.html new file mode 100644 index 0000000..2d655ba --- /dev/null +++ b/snakeplan/templates/projects/task_detail.html | |||
@@ -0,0 +1,19 @@ | |||
1 | {% extends "base.html" %} | ||
2 | |||
3 | {% block content %} | ||
4 | |||
5 | <h1>Task: {{ object.name }}</h1> | ||
6 | |||
7 | <h2>Descipton:</h2> | ||
8 | <p>{{ object.description }}</p> | ||
9 | |||
10 | <h3>Details</h3> | ||
11 | |||
12 | <ul> | ||
13 | <li>{{ object.acceptor }}</li> | ||
14 | <li>{{ object.task_type }}</li> | ||
15 | <li>{{ object.disposition }}</li> | ||
16 | <li>{{ object.estimated_hours }}</li> | ||
17 | </ul> | ||
18 | |||
19 | {% endblock %} | ||
diff --git a/snakeplan/urls.py b/snakeplan/urls.py index 9b777e4..e2620d6 100755 --- a/snakeplan/urls.py +++ b/snakeplan/urls.py | |||
@@ -9,11 +9,14 @@ from snakeplan.projects import admin as snakeplan_admin | |||
9 | 9 | ||
10 | 10 | ||
11 | urlpatterns = patterns('django.views.generic.simple', | 11 | urlpatterns = patterns('django.views.generic.simple', |
12 | (r'^$', 'redirect_to', dict(url='/project/')) | 12 | (r'^$', 'redirect_to', dict(url='/p/projects/')), |
13 | (r'^p/project/(?P<id>\d+)/$', 'redirect_to', dict(url='/p/project/%(id)s/iterations/')), | ||
14 | (r'^p/iteration/(?P<id>\d+)/$', 'redirect_to', dict(url='/p/iteration/%(id)s/stories/')), | ||
15 | (r'^p/story/(?P<id>\d+)/$', 'redirect_to', dict(url='/p/story/%(id)s/tasks/')) | ||
13 | ) | 16 | ) |
14 | 17 | ||
15 | urlpatterns += patterns('', | 18 | urlpatterns += patterns('', |
16 | (r'^admin/', include(admin.site.urls)), | 19 | (r'^admin/', include(admin.site.urls)), |
17 | (r'^project/', include('snakeplan.projects.urls')), | 20 | (r'^p/', include('projects.urls')), |
18 | (r'^static/(?P<path>.*)$', static.serve, {'document_root':'../static'}), | 21 | (r'^static/(?P<path>.*)$', static.serve, {'document_root':'../static'}), |
19 | ) | 22 | ) |