Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create basic template organization_details #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions maoaberta/maoaberta/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<pk>\d+)/$', ContributorDetailView.as_view(), name='contributor-detail')
url(r'^(?P<pk>\d+)/$', ContributorDetailView.as_view(), name='contributor-detail'),
url(r'^organization/(?P<pk>\d+)/$', OrganizationDetailView.as_view(), name='organization-detail'),
]
9 changes: 8 additions & 1 deletion maoaberta/organizations/views.py
Original file line number Diff line number Diff line change
@@ -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
17 changes: 16 additions & 1 deletion maoaberta/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
11 changes: 11 additions & 0 deletions maoaberta/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@

{% block content %}
<article class="col-md-8 col-sm-2">

<div id="custom-search-input">
<div class="input-group icon-addon-sm">
<input type="text" class="form-control input-lg" placeholder="Buscar ONGs ou projetos" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="button">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
<div class="row">
<div class="col-sm-4 col-md-4 col-lg-4">
<div class="thumbnail">
Expand Down
5 changes: 1 addition & 4 deletions maoaberta/templates/contributors/contributor_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@
<hr>
<div class="row">
<div class="col-xs-6 col-sm-4">
<div class="thumbnail">
<div class="caption">
<span class="glyphicon glyphicon-remove pull-right" aria-hidden="true"></span>
<p>
<a href="#" class="btn btn-primary" role="button">Novo</a>
<a href="#" class="btn btn-outline-primary" role="button">Novo</a>
</p>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-4">
<div class="thumbnail">
<div class="caption">
Expand Down
81 changes: 81 additions & 0 deletions maoaberta/templates/organizations/organization_details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{% extends "base.html" %}
{% load staticfiles %}

{% block title %} Organization {% endblock title %}

{% block content %}

<div class="col-md-10 organization-header">

<div id="custom-search-input">
<div class="input-group icon-addon-sm">
<input type="text" class="form-control input-lg" placeholder="Buscar" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pq tem essa busca aqui? na tela de detalhes da ong

<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="button">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>

<div class="col-md-2">
<div class="pull-left organization-detail-photo">
<img src="{{ MEDIA_URL }}{{ object.photo }}" class="img-responsive" alt="">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

se for pra deixar o alt vazio mesmo pode deletar

</div>
</div>

<div class="col-md-4">
<strong>
{{ object.name }}
</strong>
<hr>

<div>
<a class="btn btn-primary" href=" {{ object.facebook_url }}">Facebook</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tem um espaço a mais dentro do href

</div>
</div>

<div class="col-md-6">
<strong>Descrição</strong>
<hr/>
{{ object.description }}
</div>

</div>

<div class="col-md-10 ">
<div class="col-md-2">
<strong>Coordenador</strong>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separa esses caras em div:

<div class="row">
  <h5>Coordenador</h5>
  <p>{{ object.coordinator }}</p>
</div>
<div class="row">
...

<hr/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

melhor usar css para fazer esse linha

{{ object.coordinator }}
<br><br>
<strong>Localização</strong>
<hr/>
<span>São Carlos-SP</span>
<br><br>
<strong>Contribuição</strong>
<hr/>
<span></span>
</div>

<div class="col-md-6">
<strong>Precisamos de ajuda</strong>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o mesmo lance de usar <div> e <h5> no lugar de <strong> aqui

<hr/>
{{ object.necessity_description }}
<br><br>

<strong>Pedidos mensais</strong>
<hr/>
<ul class="list-group">
<li class="list-group-item"><input type="checkbox"> Papel</li>
<li class="list-group-item"><input type="checkbox"> Tesoura</li>
<li class="list-group-item"><input type="checkbox"> Pedra</li>
</ul>
</div>
<div class="col-md-4">
<strong>Check list</strong>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again

<hr/>
{{ object.projects }}
</div>
</div>
{% endblock content %}
Copy link
Contributor

@lamenezes lamenezes Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tira um print dessa tela e coloca aqui no github

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.