Skip to content

Commit

Permalink
Merge branch 'master' of github.com:GetTogetherComm/GetTogether
Browse files Browse the repository at this point in the history
  • Loading branch information
mhall119 committed Jul 10, 2020
2 parents 1552c24 + f51a98e commit 050e0b3
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 23 deletions.
64 changes: 64 additions & 0 deletions events/migrations/0052_auto_20200412_2030.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Generated by Django 2.0.12 on 2020-04-12 20:30

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [("events", "0051_add_team_membership_invites")]

operations = [
migrations.AlterModelOptions(
name="category",
options={"verbose_name": "Category", "verbose_name_plural": "Categories"},
),
migrations.AlterModelOptions(
name="city",
options={
"ordering": ("name",),
"verbose_name": "City",
"verbose_name_plural": "Cities",
},
),
migrations.AlterField(
model_name="organization",
name="description",
field=models.TextField(blank=True, null=True, verbose_name="Description"),
),
migrations.AlterField(
model_name="sponsor",
name="description",
field=models.TextField(blank=True, null=True, verbose_name="Description"),
),
migrations.AlterField(
model_name="team",
name="about_page",
field=models.TextField(blank=True, null=True, verbose_name="About page"),
),
migrations.AlterField(
model_name="team",
name="city",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="events.City",
verbose_name="City",
),
),
migrations.AlterField(
model_name="team",
name="description",
field=models.TextField(blank=True, null=True, verbose_name="Description"),
),
migrations.AlterField(
model_name="topic",
name="category",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="events.Category",
verbose_name="Category",
),
),
]
1 change: 1 addition & 0 deletions events/models/locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Meta:
class City(models.Model):
class Meta:
ordering = ("name",)
verbose_name = _("City")
verbose_name_plural = _("Cities")

name = models.CharField(_("Name"), max_length=100)
Expand Down
24 changes: 18 additions & 6 deletions events/models/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ class Organization(models.Model):
format="PNG",
)

description = models.TextField(blank=True, null=True)
description = models.TextField(
verbose_name=_("Description"), blank=True, null=True
)

def save(self, *args, **kwargs):
if not self.slug:
Expand Down Expand Up @@ -394,7 +396,7 @@ def __str__(self):

class Sponsor(models.Model):
name = models.CharField(_("Sponsor Name"), max_length=256, null=False, blank=False)
description = models.TextField(blank=True, null=True)
description = models.TextField(verbose_name=_("Description"), blank=True, null=True)
web_url = models.URLField(_("Website"), null=True, blank=True)
logo = ProcessedImageField(
verbose_name=_("Logo"),
Expand Down Expand Up @@ -455,15 +457,19 @@ class Team(models.Model):
format="PNG",
)

description = models.TextField(blank=True, null=True)
description = models.TextField(
verbose_name=_("Description"), blank=True, null=True
)

about_page = models.TextField(blank=True, null=True)
about_page = models.TextField(
verbose_name=_("About page"), blank=True, null=True
)

country = models.ForeignKey(
Country, null=True, blank=True, on_delete=models.CASCADE
)
spr = models.ForeignKey(SPR, null=True, blank=True, on_delete=models.CASCADE)
city = models.ForeignKey(City, null=True, blank=True, on_delete=models.CASCADE)
city = models.ForeignKey(City, verbose_name=_("City"), null=True, blank=True, on_delete=models.CASCADE)

web_url = models.URLField(_("Website"), null=True, blank=True)
email = models.EmailField(_("Email Address"), null=True, blank=True)
Expand Down Expand Up @@ -659,6 +665,7 @@ class TeamSerializer(serializers.ModelSerializer):

class Meta:
model = Team
verbose_name = _("Team")
fields = ("id", "name", "slug", "latitude", "longitude", "web_url")


Expand Down Expand Up @@ -693,6 +700,7 @@ class Category(models.Model):
img_url = models.URLField(blank=False, null=False)

class Meta:
verbose_name = "Category"
verbose_name_plural = "Categories"

def __str__(self):
Expand All @@ -705,7 +713,11 @@ def save(self, *args, **kwargs):

class Topic(models.Model):
category = models.ForeignKey(
Category, on_delete=models.CASCADE, null=False, blank=False
Category,
verbose_name = "Category",
on_delete=models.CASCADE,
null=False,
blank=False,
)
name = models.CharField(max_length=256)
slug = models.CharField(max_length=256, blank=True)
Expand Down
2 changes: 1 addition & 1 deletion events/templates/events/team_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<td>{{ team.country.name|default:'' }}</td>
<td>{{ team.spr.name|default:'' }}</td>
<td>{{ team.city.name|default:'' }}</td>
<td><a href="{% url 'show-profile' team.owner_profile.id %}" title="{{team.owner_profile}}'s profile">{{ team.owner_profile }}</a></td>
<td><a href="{% url 'show-profile' team.owner_profile.id %}" title="{% blocktrans %}{{team.owner_profile}}'s profile{% endblocktrans %}">{{ team.owner_profile }}</a></td>
<td>{{ team.created_time }}</td>
</tr>
{% endfor %}
Expand Down
14 changes: 7 additions & 7 deletions get_together/static/favicon/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
"short_name": "GetTogether",
"icons": [
{
"src": "/android-chrome-36x36.png",
"src": "/static/favicon/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/android-chrome-48x48.png",
"src": "/static/favicon/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "/android-chrome-72x72.png",
"src": "/static/favicon/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "/android-chrome-96x96.png",
"src": "/static/favicon/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "/android-chrome-144x144.png",
"src": "/static/favicon/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/android-chrome-192x192.png",
"src": "/static/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"src": "/static/favicon/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
}
Expand Down
2 changes: 1 addition & 1 deletion get_together/templates/get_together/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

{% if tip %}
<div class="alerts">
<div class="alert {{ tip.tags }}"><strong>{% trans "Tip:" %}" </strong>{{ tip.text|safe }}</div>
<div class="alert {{ tip.tags }}"><strong>{% trans "Tip:" %} </strong>{{ tip.text|safe }}</div>
</div>
{% endif %}

Expand Down
8 changes: 4 additions & 4 deletions get_together/templates/get_together/events/show_event.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h2>
<div class="media gt-profile">
<img class="mr-1 gt-profile-avatar" src="{{node.author.avatar_url}}" width="32px" height="32px">
<span class="gt-profile-badges">{% for badge in node.author.user.account.badges.all %}<img class="mr-0 gt-profile-badge" src="{{badge.img_url}}" title="{{badge.name}}" width="16px" height="16px">{% endfor %}</span>
<a href="{% url 'show-profile' node.author.id %}" title="{{node.author}}'s profile">{{node.author}}</a>
<a href="{% url 'show-profile' node.author.id %}" title="{% blocktrans %}{{node.author}}'s profile{% endblocktrans %}">{{node.author}}</a>
</div>
<span class="gt-hover-expose">{% if node.created_time != node.updated_time %}<i class="far fa-edit text-muted" title="{% trans 'Updated:' %} {{ node.local_updated_time}}"></i> {% endif %}{{ node.local_created_time }}</span>
</div>
Expand All @@ -284,10 +284,10 @@ <h2>
<p id="comment-body-{{node.id}}" style="white-space: pre-wrap;">{{ node.body }}</p>
<span class="gt-hover-expose">
{% if request.user.profile == node.author %}
<small><a href="javascript:void(null)" onClick="editComment({{node.id}});"><i class="fa fa-edit"></i> Edit</a></small>&nbsp;
<small><a href="javascript:void(null)" onClick="editComment({{node.id}});"><i class="fa fa-edit"></i> {% trans "Edit" %}</a></small>&nbsp;
{% endif %}
{% if can_edit_team or request.user.profile == node.author %}
<small><a href="{% url 'comment-delete' node.id %}"><i class="fa fa-times"></i> Delete</a></small>
<small><a href="{% url 'comment-delete' node.id %}"><i class="fa fa-times"></i> {% trans "Delete" %}</a></small>
{% endif %}
</span>
</div>
Expand Down Expand Up @@ -357,7 +357,7 @@ <h2>
<span class="gt-profile-badges">{% for badge in attendee.user.user.account.badges.all %}<img class="mr-0 gt-profile-badge" src="{{badge.img_url}}" title="{{badge.name}}" width="16px" height="16px">{% endfor %}</span>
<div class="media-body">
<h6 class="mt-2 mb-0">
<a href="{% url 'show-profile' attendee.user.id %}" title="{{attendee.user}}'s profile">{{attendee.user}}</a>
<a href="{% url 'show-profile' attendee.user.id %}" title="{% blocktrans %}{{attendee.user}}'s profile{% endblocktrans %}">{{attendee.user}}</a>
{% if attendee.user.user == request.user and not event.is_over %}
{% if attendee.status == attendee.YES %}
<span class="badge badge-success dropdown-toggle align-top" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ attendee.status_name }}</span>
Expand Down
6 changes: 3 additions & 3 deletions get_together/templates/get_together/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h3>{% trans "Nearby Events" %}</h3>
<div class="d-flex justify-content-between align-items-center">
<small class="text-muted">{{ event.local_start_time }}<br/>{{event.location_name}}</small>
<div class="btn-group">
<a class="btn btn-primary" href="{{event.event_url}}">View</a></span>
<a class="btn btn-primary" href="{{event.event_url}}">{% trans "View" %}</a></span>
</div>
</div>
</div>
Expand All @@ -55,7 +55,7 @@ <h3>{% trans "Nearby Events" %}</h3>
{% blocktrans %}There are no events within {{ distance }}km of you.{% endblocktrans %}
{% endif %}
<a class="btn btn-success btn-sm" href="{% url 'create-event-team-select' %}">{% trans "Create one now" %}</a>
or
{% trans "or" %}
<a class="btn btn-primary btn-sm" href="{% url 'all-events' %}">{% trans "View all events" %}</a>
</div>
</div>
Expand Down Expand Up @@ -131,7 +131,7 @@ <h3>{% trans "Nearby Teams" %}</h3>
{% blocktrans %}There are no teams within {{ distance }}km of you.{% endblocktrans %}
{% endif %}
<a class="btn btn-success btn-sm" href="{% url 'create-team' %}">{% trans "Create one now" %}</a>
or
{% trans "or" %}
<a class="btn btn-primary btn-sm" href="{% url 'all-teams' %}">{% trans "View all teams" %}</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4>{% trans "Members" %}</h4><hr/>
<img class="mr-1 gt-profile-avatar" src="{{member.user.avatar_url}}" width="32px" height="32px">
<span class="gt-profile-badges">{% for badge in member.user.user.account.badges.all %}<img class="mr-0 gt-profile-badge" src="{{badge.img_url}}" title="{{badge.name}}" width="16px" height="16px">{% endfor %}</span>
<div class="media-body">
<h6 class="mt-0 mb-0"><a href="{% url 'show-profile' member.user.id %}" title="{{member.user}}'s profile">{{member.user}}</a></h6>
<h6 class="mt-0 mb-0"><a href="{% url 'show-profile' member.user.id %}" title="{% blocktrans %}{{member.user}}'s profile{% endblocktrans %}">{{member.user}}</a></h6>
{% if member.role > 0 %}<small class="text-muted">{{ member.role_name }}</small>{% endif %}
</div>
</div>
Expand Down

0 comments on commit 050e0b3

Please sign in to comment.