Skip to content

Commit

Permalink
hotfix(vote): remove link from partners module
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelzinh3 committed Sep 10, 2024
1 parent 88b5296 commit 19764b6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/contrib/partners/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

@admin.register(Partner)
class PartnerAdmin(SortableAdminMixin, admin.ModelAdmin):
list_display = ("name", "link")
list_display = ("name", "logo")
17 changes: 17 additions & 0 deletions app/contrib/partners/migrations/0004_remove_partner_link.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2 on 2024-09-10 19:44

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('partners', '0003_alter_partner_position'),
]

operations = [
migrations.RemoveField(
model_name='partner',
name='link',
),
]
3 changes: 1 addition & 2 deletions app/contrib/partners/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
class Partner(models.Model):
name = models.CharField(max_length=100, verbose_name="Nome da Parceria")
logo = FilerFileField(verbose_name=_("Imagem"), on_delete=models.SET_NULL, null=True, blank=True)
link = models.URLField(blank=True, null=True, verbose_name="Link da Parceria")

position = models.PositiveIntegerField(
default=0,
Expand All @@ -21,4 +20,4 @@ def __str__(self):

class Meta:
verbose_name = "Parceiro"
ordering = ["position"]
ordering = ["position"]
4 changes: 2 additions & 2 deletions app/contrib/partners/templates/partners/partners_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% for partner in partners %}
<a href="{{ partner.link }}" target="_blank" rel="noopener noreferrer">
<div class="partner-logo">
<img src="{{ partner.logo.url }}" alt="{{ partner.name }}">
</a>
</div>
{% endfor %}
4 changes: 2 additions & 2 deletions app/org_eleicoes/votepeloclima/static/scss/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ legend.form-label {

// Partner Tag
.partners-list {
a {
div {
display: flex;
justify-content: center;
align-items: center;
Expand All @@ -225,4 +225,4 @@ legend.form-label {
object-fit: contain;
object-position: center;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{% comment %} <li><a class="text-white text-uppercase fw-bold" href="{% url 'candidature-list' %}" rel="noopener noreferrer">Conheça as candidaturas</a></li> {% endcomment %}
<li><a class="text-white text-uppercase fw-bold" href="{% url 'register' %}" rel="noopener noreferrer">Cadastre-se</a></li>
<li><a class="text-white text-uppercase fw-bold" href="{% url 'dashboard' %}" rel="noopener noreferrer">Login</a></li>
<li><a class="text-white text-uppercase fw-bold" href="mailto:[email protected]" rel="noopener noreferrer">Contato</a></li>
<li><a class="text-white text-uppercase fw-bold" href="/contato" rel="noopener noreferrer">Contato</a></li>
</ul>
</div>
<div class="g-col-12 g-col-md-4">
Expand Down

0 comments on commit 19764b6

Please sign in to comment.