diff --git a/akvo/rsr/views/my_rsr.py b/akvo/rsr/views/my_rsr.py index edfae004f6..ccdb55497e 100644 --- a/akvo/rsr/views/my_rsr.py +++ b/akvo/rsr/views/my_rsr.py @@ -53,7 +53,8 @@ def my_updates(request): @login_required def my_projects(request): - context = {'projects': Project.objects.published()} + projects = request.user.organisations.all_projects().published().distinct() + context = {'projects': projects} return render(request, 'myrsr/my_projects.html', context) @permission_required('rsr.delete_user', raise_exception=True) diff --git a/akvo/templates/myrsr/my_projects.html b/akvo/templates/myrsr/my_projects.html index d1dece8036..2f91738190 100644 --- a/akvo/templates/myrsr/my_projects.html +++ b/akvo/templates/myrsr/my_projects.html @@ -1,6 +1,6 @@ {% extends "myrsr/myrsr_base.html" %} -{% load i18n bootstrap3 %} +{% load i18n bootstrap3 rsr_utils thumbnail %} {% block title %}{% trans "MyRSR - my proejcts" %}{% endblock %} @@ -8,50 +8,31 @@
Image | -Location | -Status | -. | -
-
-
-
-
-
- Title-Subtitle - |
- ... | -... | -- View, Edit, Publish - | -
-
-
-
-
-
- Title-Subtitle - |
- ... | -... | -- View, Edit, Publish - | -
Project | Location | Status | Actions |
---|---|---|---|
+
+
+
+
+
+ {{ project.title }}+{{ project.subtitle }} + |
+ {{ project.primary_location.country }} | +{{ project.show_status }} | ++ View + {% if user.is_staff %}, Edit, Publish{% endif %} + | +