Skip to content

Commit

Permalink
nicer button placement
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Glatthard committed Aug 12, 2015
1 parent 3e4a2ff commit 1465d1a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
60 changes: 30 additions & 30 deletions ipynbsrv/web/templates/web/collaborationgroups/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,36 @@

{% block content %}
<div class="row">
<div class="col-xs-12">
<div class="col-xs-12 ">
{% include 'web/snippets/messages.html' with messages=messages only %}

<h1>Group</h1>
<fieldset class="btn-create pull-right">
{% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %}
<form action="{% url 'group_delete' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-danger btn-delete pull-right" title="Delete this group?" data-toggle="confirmation" data-placement="bottom">Delete Group
</button>
</form>
{% endif %}
{% if request.user.backend_user.id not in group.member_ids and group.is_public %}
<form action="{% url 'group_join' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-primary btn-delete pull-right" title="Join this public group?" data-toggle="confirmation" data-placement="bottom">Join Group
</button>
</form>
{% endif %}
{% if request.user.backend_user.id in group.member_ids and request.user.backend_user.id != group.creator.id and group.creator %}
<form action="{% url 'group_leave' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-warning btn-delete pull-right" title="Leave this public group?" data-toggle="confirmation" data-placement="bottom">Leave Group
</button>
</form>
<form action="{% url 'group_delete' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-danger" title="Delete this group?" data-toggle="confirmation" data-placement="bottom">Delete Group
</button>
</form>
{% endif %}
{% if request.user.backend_user.id not in group.member_ids and group.is_public %}
<form action="{% url 'group_join' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-primary" title="Join this public group?" data-toggle="confirmation" data-placement="bottom">Join Group
</button>
</form>
{% endif %}
{% if request.user.backend_user.id in group.member_ids and request.user.backend_user.id != group.creator.id and group.creator %}
<form action="{% url 'group_leave' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="group_id" value="{{ group.id }}">
<button class="btn btn-warning" title="Leave this public group?" data-toggle="confirmation" data-placement="bottom">Leave Group
</button>
</form>
{% endif %}
</fieldset>

<table class="table">
<thead>
Expand All @@ -58,13 +60,11 @@ <h1>Group</h1>
</table>

<h2>Members</h2>
<div class="row" style="margin-bottom: 20px">
{% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %}
<form role="form" class="col-xs-12">
<button type="button" class="btn btn-primary btn-add pull-right" data-toggle="modal" data-target="#modal-group-addusers">Add Users</button>
</form>
{% endif %}
</div>
{% if request.user.backend_user.id in group.admins or request.user.backend_user.id == group.creator.id %}
<form role="form">
<button type="button" class="btn btn-primary btn-create pull-right" data-toggle="modal" data-target="#modal-group-addusers">Add Users</button>
</form>
{% endif %}
<table class="table table-hover table-striped js-table-smart" cellspacing="0" width="100%">
<thead>
<tr>
Expand Down
13 changes: 6 additions & 7 deletions ipynbsrv/web/templates/web/shares/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>Share</h1>
<form action="{% url 'share_delete' %}" method="POST" role="form">
{% csrf_token %}
<input type="hidden" name="share_id" value="{{ share.id }}">
<button class="btn btn-danger btn-delete pull-right" title="Delete this share?" data-toggle="confirmation" data-placement="bottom">Delete Share
<button class="btn btn-danger btn-create pull-right" title="Delete this share?" data-toggle="confirmation" data-placement="bottom">Delete Share
</button>
</form>
{% endif %}
Expand Down Expand Up @@ -57,9 +57,9 @@ <h1>Share</h1>

{% if request.user.backend_user.id == share.owner.id %}
<h2>Shared with...</h2>
<div class="row" style="margin-bottom: 20px">
<form role="form" class="col-xs-12">
<fieldset class="pull-right">
<fieldset class="pull-right btn-create">
<form role="form">
<button type="button" class="btn btn-primary btn-adduser" data-toggle="modal" data-target="#modal-share-adduser">
Add user
</button>
Expand All @@ -72,9 +72,8 @@ <h2>Shared with...</h2>
Add group
</button>
{% endif %}
</fieldset>
</form>
</div>
</form>
</fieldset>
<table class="table table-hover table-striped js-table-smart" cellspacing="0" width="100%">
<thead>
<tr>
Expand Down

0 comments on commit 1465d1a

Please sign in to comment.