-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added latest_news card for user dashboards
- Loading branch information
Showing
7 changed files
with
128 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
{% load market_url %} | ||
|
||
{% block title %}Principal{% endblock%} | ||
{% block bodyattrs %} class="main-bg"{% endblock%} | ||
{% block content %} | ||
<div class="container mt-3"> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="card mb-4"> | ||
<div class="bg-warning py-4 text-center"> | ||
<div class="d-inline-block m-auto"> | ||
{% include "account/profile_circle.html" with account=object %} | ||
</div> | ||
|
||
</div> | ||
<div class="card-body"> | ||
<div class="card-title primary-title mb-0"><h3 class="mb-0"><i class="ic ic-entity"></i> Mi perfil</h3></div> | ||
<div class="card-text text-dark"> | ||
<p class="lead my-0"> {{ account.display_name }}</p> | ||
{{account.address}} | ||
</div> | ||
</div> | ||
|
||
<div class="list-group list-group-flush"> | ||
<a class="list-group-item list-group-item-action" href="{% url 'market:user_account' %}"><i class="material-icons mr-2">store</i> Ver perfil</a> | ||
<a class="list-group-item list-group-item-action" href="{% url 'market:member_card' %}"><i class="material-icons-outlined mr-2">perm_contact_calendar</i> Mi carnet de socia</a> | ||
<a class="list-group-item list-group-item-action disabled" href="#"><i class="material-icons mr-2">bar_chart</i> Ver estadísticas de favoritos</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
|
||
<div class="card mb-3"> | ||
<div class="header-img"> <img class="img-fluid" src="{% static 'imgs/mes_app.png' %}"> </div> | ||
<div class="card-body"> | ||
|
||
<p class="lead text-primary mb-0"> | ||
¿Tienes ya la app del Mercado Social? | ||
</p> | ||
<div class="d-flex align-items-center flex-column"> | ||
<a href='https://play.google.com/store/apps/details?id=net.mercadosocial.moneda&gl=US&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'> | ||
<img width="250px" alt='Disponible en Google Play' src={% static '/imgs/google-play.png' %}/> | ||
</a> | ||
|
||
<a href="https://apps.apple.com/es/app/mercado-social/id1458549528?itsct=apps_box_badge&itscg=30200" style="display: inline-block; overflow: hidden; border-radius: 13px; width: 250px; height: 83px;"> | ||
<img src="{% static '/imgs/app-store.svg' %}" alt="Download on the App Store" style="border-radius: 13px; width: 250px; height: 83px;"> | ||
</a> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
{% include 'dashboard/last_news.html' %} | ||
</div> | ||
|
||
</div> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="card mb-4"> | ||
<div class="bg-brand text-light p-2 px-3"> | ||
<h3 class="card-title">Últimas noticias</h3> | ||
</div> | ||
<div class="card-body"> | ||
{% for item in last_news %} | ||
{% include 'news/card.html' with news=item %} | ||
|
||
{% empty %} | ||
No hay noticias publicadas en este mercado... | ||
{% endfor %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,10 @@ | |
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="col-md-4"> | ||
{% include 'dashboard/last_news.html' %} | ||
</div> | ||
|
||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% load static %} | ||
|
||
<div class="d-flex"> | ||
<div class="img mr-3"> | ||
<img class="img-fluid" style="width:200px;" src="{% if news.banner_image %}{{ news.banner_image.url }}{% else %}{% static 'imgs/default-news.png' %}{% endif %}" alt="{{news.title}}"> | ||
</div> | ||
<div class="flex-grow-1"> | ||
<h4 class="mb-0"> {{news.title}}</h4> | ||
<div class="small"> {{news.published_date|date:'d/m/Y'}}</div> | ||
|
||
<div class="text-primary text-truncate"><strong>{{news.short_description|striptags|safe}}</strong></div> | ||
</div> | ||
</div> | ||
<div class="bg-light p-2 text-right my-3"> | ||
|
||
{% if news.more_info_url %} | ||
<a class="btn btn-action btn-primary" href="{{news.more_info_url}}">{% if news.more_info_text %} {{news.more_info_text}} {% else %} Saber más {% endif %} </a> | ||
{% endif %} | ||
<a class="btn btn-action btn-secondary text-light" href="{{news.more_info_url}}">ver noticia</a> | ||
</div> |