Skip to content

Commit

Permalink
Merge branch 'gl-convenience-buttons'
Browse files Browse the repository at this point in the history
  • Loading branch information
garethlawson committed Oct 24, 2017
2 parents d46639b + 3b21f6e commit 1dbaeca
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 3 deletions.
18 changes: 18 additions & 0 deletions public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,20 @@ a.remove-vulnerability {
cursor: pointer;
}

.convenience-buttons {
position: relative;
top: 30px;
z-index: 2;
width: 100%;
text-align: right;
background: #fff;
padding-top: 10px;
}

.convenience-buttons a {
display: inline-block;
}

.http-data a.collapsed .collapsed-state, .http-data a:not(.collapsed) .expanded-state {
display: inline-block;
}
Expand All @@ -1125,6 +1139,10 @@ label {
font-size: 15px !important;
}

.user-admin {
border-radius: 0 0.25em 0.25em 0;
}

.red-form-control {
display: block;
width: 100%;
Expand Down
17 changes: 17 additions & 0 deletions resources/views/partials/app.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
<div class="col-md-4 col-sm-6">
@can (App\Policies\ComponentPolicy::ACTION_EDIT, $app)
<div class="convenience-buttons">
<a href="{{ route('app.edit', [$app->getRouteParameterName() => $app->getId()]) }}">
<button type="button" class="btn round-btn pull-right c-purple">
<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
</button>
</a>
<a href="{{ route('app.delete', [
'workspaceId' => $app->getWorkspace()->getId(),
'workspaceAppId' => $app->getId()
]) }}" class="delete-link">
<button type="button" class="btn round-btn pull-right c-red">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</a>
</div>
@endcan
@if ($app->isRuggedyApp())
<a href="{{ route('ruggedy-app.view', ['fileId' => $app->getFiles()->first()->getId()]) }}">
@else
Expand Down
15 changes: 15 additions & 0 deletions resources/views/partials/folder.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<div class="col-md-4 col-sm-6">
<div class="convenience-buttons">
@can (App\Policies\ComponentPolicy::ACTION_EDIT, $folder)
<a href="{{ route('folder.edit', [$folder->getRouteParameterName() => $folder->getId()]) }}">
<button type="button" class="btn round-btn pull-right c-purple">
<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
</button>
</a>
<a href="{{ route('folder.delete', [$folder->getRouteParameterName() => $folder->getId()]) }}"
class="delete-link">
<button type="button" class="btn round-btn pull-right c-red">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</a>
@endcan
</div>
<a href="{{ route('folder.view', ['folderId' => $folder->getId()]) }}">
<div class="card hovercard animated pulse-hover">
<div class="cardheader c-white"></div>
Expand Down
21 changes: 18 additions & 3 deletions resources/views/partials/user.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
<div class="col-md-4 col-sm-6">
<div class="convenience-buttons">
@if ($user->isAdmin())
<span class="label label-success user-admin pull-left t-s-10 m-r-8">admin</span>
@endif
<a href="{{ route('settings.user.edit', ['userId' => $user->getId()]) }}">
<button type="button" class="btn round-btn pull-right c-purple">
<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
</button>
</a>
@if (!empty(Auth::user()) && Auth::user()->getId() !== $user->getId())
<a href="{{ route('settings.user.delete', [$user->getRouteParameterName() => $user->getId()]) }}"
class="delete-link">
<button type="button" class="btn round-btn pull-right c-red">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</a>
@endif
</div>
<a href="{{ route('settings.user.edit', ['userId' => $user->getId()]) }}">
<div class="content-card animated pulse-hover">
@if ($user->isAdmin())
<span class="label label-success pull-right t-s-10">admin</span>
@endif
<h4 class="h-4-1">{{ $user->getName() }}</h4>
<p class="t-1">{{ $user->getEmail() }}</p>
</div>
Expand Down
15 changes: 15 additions & 0 deletions resources/views/partials/workspace.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<div class="col-md-4 col-sm-6">
@can (App\Policies\ComponentPolicy::ACTION_EDIT, $workspace)
<div class="convenience-buttons">
<a href="{{ route('workspace.edit', [$workspace->getRouteParameterName() => $workspace->getId()]) }}">
<button type="button" class="btn round-btn pull-right c-purple">
<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
</button>
</a>
<a href="{{ route('workspace.delete', [$workspace->getRouteParameterName() => $workspace->getId()]) }}"
class="delete-link">
<button type="button" class="btn round-btn pull-right c-red">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</a>
</div>
@endcan
<a href="{{ route('workspace.view', ['workspaceId' => $workspace->getId()]) }}">
<div class="card hovercard animated pulse-hover">
<div class="cardheader c-white">
Expand Down
22 changes: 22 additions & 0 deletions resources/views/workspaces/app.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<?php
/**
* @var App\Entities\File $file
*/
?>
@extends('layouts.main')

@section ('breadcrumb')
Expand Down Expand Up @@ -70,6 +75,23 @@ class="primary-btn" type="button">Add File</a>
<div class="row">
@foreach($files as $file)
<div class="col-md-4 animated pulse-hover">
<div class="convenience-buttons">
@can (App\Policies\ComponentPolicy::ACTION_EDIT, $file)
<a href="{{ route('file.delete', [
$file->getRouteParameterName() => $file->getId(),
$file->getWorkspaceApp()->getRouteParameterName() => $file->getWorkspaceApp()->getId()
]) }}" class="delete-link">
<button type="button" class="btn round-btn pull-right c-red">
<i class="fa fa-trash-o fa-lg" aria-hidden="true"></i>
</button>
</a>
<a href="{{ route('file.edit', [$file->getRouteParameterName() => $file->getId()]) }}">
<button type="button" class="btn round-btn pull-right c-purple">
<i class="fa fa-pencil fa-lg" aria-hidden="true"></i>
</button>
</a>
@endcan
</div>
<a href="{{ route('file.view', ['fileId' => $file->getId()]) }}">
<div class="file-card">
<div class="img-float">
Expand Down

0 comments on commit 1dbaeca

Please sign in to comment.