Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #763 from kawazrepos/event-status
Browse files Browse the repository at this point in the history
イベントの「参加を辞める」ボタンが変だったの修正
  • Loading branch information
giginet committed Dec 6, 2014
2 parents 9ff694a + 5d02809 commit 6c51acf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/kawaz/apps/events/fixtures/debug.yaml
Expand Up @@ -14,7 +14,7 @@
pub_state: public
number_restriction: 3
title: 5/22 Kawazミーティング
attendance_deadline: "2014-11-01 00:00:00+09:00"
attendance_deadline: "2015-11-01 00:00:00+09:00"
body: |-
##### 概要
Expand Down
8 changes: 7 additions & 1 deletion src/statics/less/events.less
Expand Up @@ -146,10 +146,16 @@
.page-header-right {
text-align: center;
padding: 0;
.event-join-utility {
.event-status-control {
width: 220px;
margin: 10px auto 0;
.btn-danger {
.event-attend-icon {
margin-right: 5px;
}
}
.btn {
width: 220px;
margin-bottom: 5px;
}
.event-leave-btn {
Expand Down
4 changes: 2 additions & 2 deletions src/templates/events/event_archive_month.html
Expand Up @@ -24,7 +24,7 @@ <h1>{% blocktrans with month=month|date:"Y年m" %}Events on {{ month }}{% endblo
<div class="col col-lg-3 col-xs-12 header-right">
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}"
class="btn btn-success btn-primary btn-lg">
class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-plus"></span>
<span>{% trans "Create a new event" %}</span>
</a>
Expand All @@ -41,7 +41,7 @@ <h1>{% blocktrans with month=month|date:"Y年m" %}Events on {{ month }}{% endblo
<div class="alert alert-info">
<p>{% trans "Matching events can not be found" %}</p>
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}" class="btn btn-success btn-primary"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
<a href="{% url "events_event_create" %}" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
{% endif %}
</div>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/events/event_archive_year.html
Expand Up @@ -24,7 +24,7 @@ <h1>{% blocktrans with year=year|date:"Y" %}Events on {{ year }}{% endblocktrans
<div class="col col-lg-3 col-xs-12 header-right">
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}"
class="btn btn-success btn-primary btn-lg">
class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-plus"></span>
<span>{% trans "Create a new event" %}</span>
</a>
Expand All @@ -41,7 +41,7 @@ <h1>{% blocktrans with year=year|date:"Y" %}Events on {{ year }}{% endblocktrans
<div class="alert alert-info">
<p>{% trans "Matching events can not be found" %}</p>
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}" class="btn btn-success btn-primary"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
<a href="{% url "events_event_create" %}" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
{% endif %}
</div>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions src/templates/events/event_detail.html
Expand Up @@ -70,7 +70,7 @@ <h2>{{ event.title }}</h2>
</div>
</div>
<div class="col col-lg-3 col-xs-12 page-header-right">
<div class="event-join-utility">
<div class="event-status-control">
{# event.number_restriction が設定されている場合は「あと何人」参加可能かを計算し変数に代入 #}
{% if even.number_restriction %}
{% expr event.number_restriction - event.attendees.count() as remaining_attendees_restriction %}
Expand All @@ -80,7 +80,7 @@ <h2>{{ event.title }}</h2>
{% if user has 'events.attend_event' of event %}
{# 参加できる状態 #}
<a href="{% url "events_event_attend" event.pk %}"
class="btn btn-success btn-large btn-lg btn-primary post-link">
class="btn btn-success btn-large btn-lg post-link">
<span class="glyphicon glyphicon-plus"></span>
<span>{% trans "Attend this event" %}</span>
<form method="POST" style="display: none;">{% csrf_token %}</form>
Expand Down Expand Up @@ -109,8 +109,8 @@ <h2>{{ event.title }}</h2>
{% elif user has 'events.quit_event' of event %}
{# イベント参加者 #}
<a href="{% url "events_event_quit" event.pk %}"
class="btn btn-danger btn-large post-link">
<span class="glyphicon glyphicon-log-out"></span><span>{% trans "Withdraw from the event" %}</span>
class="btn btn-danger btn-large btn-lg post-link">
<span class="glyphicon glyphicon-log-out event-attend-icon"></span><span>{% trans "Withdraw from the event" %}</span>
<form method="POST" style="display: none;">{% csrf_token %}</form>
</a>
{% else %}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/events/event_list.html
Expand Up @@ -24,7 +24,7 @@ <h1>{% trans "Upcoming events" %}</h1>
<div class="col col-lg-3 col-xs-12 header-right">
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}"
class="btn btn-success btn-primary btn-lg">
class="btn btn-success btn-lg">
<span class="glyphicon glyphicon-plus"></span>
<span>{% trans "Create a new event" %}</span>
</a>
Expand All @@ -41,7 +41,7 @@ <h1>{% trans "Upcoming events" %}</h1>
<div class="alert alert-info">
<p>{% trans "Matching events can not be found" %}</p>
{% if user has 'events.add_event' %}
<a href="{% url "events_event_create" %}" class="btn btn-success btn-primary"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
<a href="{% url "events_event_create" %}" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> {% trans "Create a new event" %}</a>
{% endif %}
</div>
{% endfor %}
Expand Down

0 comments on commit 6c51acf

Please sign in to comment.