diff --git a/maoaberta/maoaberta/urls.py b/maoaberta/maoaberta/urls.py index 93bf3ba..11d9dfe 100644 --- a/maoaberta/maoaberta/urls.py +++ b/maoaberta/maoaberta/urls.py @@ -18,11 +18,12 @@ from contributors.views import LoginView from contributors.views import ContributorDetailView -from organizations.views import HomePageView +from organizations.views import HomePageView, OrganizationDetailView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', HomePageView.as_view(), name='home'), url(r'^login/$', LoginView.as_view(), name='login'), - url(r'^(?P\d+)/$', ContributorDetailView.as_view(), name='contributor-detail') + url(r'^(?P\d+)/$', ContributorDetailView.as_view(), name='contributor-detail'), + url(r'^organization/(?P\d+)/$', OrganizationDetailView.as_view(), name='organization-detail'), ] diff --git a/maoaberta/organizations/views.py b/maoaberta/organizations/views.py index 3dbd7b4..de8cd64 100644 --- a/maoaberta/organizations/views.py +++ b/maoaberta/organizations/views.py @@ -1,5 +1,12 @@ -from django.views.generic import TemplateView +from django.views.generic import DetailView, TemplateView +from .models import Organization class HomePageView(TemplateView): template_name = 'base.html' + + +class OrganizationDetailView(DetailView): + + template_name = 'organizations/organization_details.html' + model = Organization diff --git a/maoaberta/static/css/custom.css b/maoaberta/static/css/custom.css index 6b4a2b7..754c5ac 100644 --- a/maoaberta/static/css/custom.css +++ b/maoaberta/static/css/custom.css @@ -149,6 +149,21 @@ article { margin: 20px 40px 20px 40px; } -aside { +.organization-detail-photo img { + float: none; + align-content: left; + margin: 0 auto; + width: 50%; + -webkit-border-radius: 50% !important; + -moz-border-radius: 50% !important; + border-radius: 50% !important; + max-width: 250px; +} +.organization-header { + margin-bottom: 30px; +} + +.list-group-item { + color:#000; } \ No newline at end of file diff --git a/maoaberta/templates/base.html b/maoaberta/templates/base.html index 9c2ce7d..a1bfe22 100644 --- a/maoaberta/templates/base.html +++ b/maoaberta/templates/base.html @@ -79,6 +79,17 @@ {% block content %}
+ +
+
+ + + + +
+
diff --git a/maoaberta/templates/contributors/contributor_details.html b/maoaberta/templates/contributors/contributor_details.html index 63acd2e..51c92a4 100644 --- a/maoaberta/templates/contributors/contributor_details.html +++ b/maoaberta/templates/contributors/contributor_details.html @@ -44,15 +44,12 @@
-
-

- Novo + Novo

-
diff --git a/maoaberta/templates/organizations/organization_details.html b/maoaberta/templates/organizations/organization_details.html new file mode 100644 index 0000000..190dcda --- /dev/null +++ b/maoaberta/templates/organizations/organization_details.html @@ -0,0 +1,81 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block title %} Organization {% endblock title %} + +{% block content %} + +
+ +
+
+ + + + +
+
+ +
+
+ +
+
+ +
+ + {{ object.name }} + +
+ +
+ Facebook +
+
+ +
+ Descrição +
+ {{ object.description }} +
+ +
+ +
+
+ Coordenador +
+ {{ object.coordinator }} +

+ Localização +
+ São Carlos-SP +

+ Contribuição +
+ +
+ +
+ Precisamos de ajuda +
+ {{ object.necessity_description }} +

+ + Pedidos mensais +
+
    +
  • Papel
  • +
  • Tesoura
  • +
  • Pedra
  • +
+
+
+ Check list +
+ {{ object.projects }} +
+
+{% endblock content %} \ No newline at end of file diff --git a/maoaberta/templates/organizations/organization_details.png b/maoaberta/templates/organizations/organization_details.png new file mode 100644 index 0000000..cd4f0d9 Binary files /dev/null and b/maoaberta/templates/organizations/organization_details.png differ