v0.9.4 - Added remove function to feedback admin page

Added - You can now see if you're participating an event on event.index and yourevents.blade.php
Fixed `Tilbage` buttons
This commit is contained in:
Anders 2020-08-13 09:08:34 +02:00
parent 4a46817265
commit 0300a6a76b
10 changed files with 151 additions and 183 deletions

View File

@ -125,7 +125,7 @@ class FeedbackController extends Controller
$feedback = Feedbacks::find($id);
$feedback->delete();
return Response::detect("feedbacks.destroy");
return redirect()->route("feedbacks.index");
}

View File

@ -1,23 +1,19 @@
@charset "UTF-8";
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Regular.ttf");
font-weight: normal;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-SemiBold.ttf");
font-weight: 600;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Bold.ttf");
font-weight: 700;
}
form {
max-width: 100%;
padding: 0 0.45rem 0 0.45rem;
@ -70,8 +66,7 @@ input[type=file] {
display: inline-flex;
}
input,
select {
input, select {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
@ -289,8 +284,7 @@ span.toggle__text.sde-blue {
font-family: "Titillium Web";
}
html,
body {
html, body {
width: 100%;
margin: 0;
padding: 0;
@ -538,7 +532,6 @@ a {
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
.fa,
.fas,
.far,
@ -618,7 +611,6 @@ a {
margin-left: 2.5em;
padding-left: 0;
}
.fa-ul > li {
position: relative;
}
@ -652,7 +644,6 @@ a {
.fab.fa-pull-left {
margin-right: 0.3em;
}
.fa.fa-pull-right,
.fas.fa-pull-right,
.far.fa-pull-right,
@ -675,7 +666,6 @@ a {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
@ -685,12 +675,10 @@ a {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.fa-rotate-90 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
transform: rotate(90deg);
@ -716,8 +704,7 @@ a {
transform: scale(1, -1);
}
.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
transform: scale(-1, -1);
}
@ -763,7 +750,6 @@ a {
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.fa-500px:before {
content: "\F26E";
}
@ -6567,8 +6553,7 @@ readers do not read off random characters that represent icons */
width: 1px;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
.sr-only-focusable:active, .sr-only-focusable:focus {
clip: auto;
height: auto;
margin: 0;
@ -6581,7 +6566,6 @@ readers do not read off random characters that represent icons */
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
@font-face {
font-family: "Font Awesome 5 Free";
font-style: normal;
@ -6590,7 +6574,6 @@ readers do not read off random characters that represent icons */
src: url("/webfonts/fa-solid-900.eot");
src: url("/webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("/webfonts/fa-solid-900.woff2") format("woff2"), url("/webfonts/fa-solid-900.woff") format("woff"), url("/webfonts/fa-solid-900.ttf") format("truetype"), url("/webfonts/fa-solid-900.svg#fontawesome") format("svg");
}
.fa,
.fas {
font-family: "Font Awesome 5 Free";
@ -6629,8 +6612,7 @@ main {
margin: 7rem 0 5rem 0;
}
header,
#menu {
header, #menu {
padding: 1.25rem 1.75rem 0 1.75rem;
}
@ -6680,11 +6662,9 @@ main {
justify-content: center;
}
}
.mock-up-link {
display: none;
}
@media (min-width: 768px) {
.mock-up-link {
display: block;
@ -6698,7 +6678,6 @@ main {
max-width: 414px;
overflow-y: auto;
}
@media (min-width: 415px) {
.main-container-wrapper {
box-shadow: 0px 32px 47px rgba(32, 23, 23, 0.09);
@ -6718,17 +6697,14 @@ main {
top: -25px;
width: 80px;
}
.header__btn .icon {
display: inline-block;
}
.header__btn--left {
left: -25px;
padding-left: 38px;
text-align: left;
}
.header__btn--right {
padding-right: 32px;
right: -25px;
@ -6740,12 +6716,10 @@ main {
padding: 16px;
margin-bottom: 24px;
}
.calendar-container__header {
display: flex;
justify-content: space-between;
}
.calendar-container__btn {
background: transparent;
border: 0;
@ -6754,7 +6728,6 @@ main {
outline: none;
color: #E9E8E8;
}
.calendar-container__title {
color: #222741;
font-size: 20px;
@ -6769,7 +6742,6 @@ main {
margin-top: 12px;
width: 100%;
}
.calendar-table__item {
border-radius: 50%;
color: #424588;
@ -6782,21 +6754,17 @@ main {
justify-content: center;
cursor: pointer;
}
.calendar-table__item:hover > span {
color: white;
}
.calendar-table__row {
display: flex;
justify-content: center;
}
.calendar-table__header {
border-bottom: 2px solid #F2F6F8;
margin-bottom: 4px;
}
.calendar-table__header .calendar-table__col {
display: inline-block;
color: #99A4AE;
@ -6808,115 +6776,95 @@ main {
width: 40px;
height: 18px;
}
@media (min-width: 350px) {
.calendar-table__header .calendar-table__col {
width: 46px;
height: 20.7px;
}
}
@media (min-width: 390px) {
.calendar-table__header .calendar-table__col {
width: 56px;
height: 25.2px;
}
}
.calendar-table__body .calendar-table__col {
width: 40px;
height: 40px;
border-radius: 50%;
}
@media (min-width: 350px) {
.calendar-table__body .calendar-table__col {
width: 46px;
height: 46px;
}
}
@media (min-width: 390px) {
.calendar-table__body .calendar-table__col {
width: 56px;
height: 56px;
}
}
@media (min-width: 410px) {
.calendar-table__body .calendar-table__col {
width: 56px;
height: 56px;
}
}
@media (min-width: 460px) {
.calendar-table__body .calendar-table__col {
width: 61px;
height: 61px;
}
}
.calendar-table__body .calendar-table__col.selected {
background: #00788a;
transition: all 0.3s ease-in;
outline: none;
}
.calendar-table__today .calendar-table__item {
border-color: #FEFEFE;
background-color: #00788a;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
}
.calendar-table__event .calendar-table__item {
background-color: #00788a;
border-color: #FEFEFE;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
color: #fff;
}
.calendar-table__event--long {
overflow-x: hidden;
}
.calendar-table__event--long .calendar-table__item {
border-radius: 0;
}
.calendar-table__event--start .calendar-table__item {
border-left: 2px solid #fff;
border-radius: 50% 0 0 50%;
}
.calendar-table__event--start.calendar-table__col:last-child .calendar-table__item {
border-width: 2px;
}
.calendar-table__event--end .calendar-table__item {
border-right: 2px solid #fff;
border-radius: 0 50% 50% 0;
}
.calendar-table__event--end.calendar-table__col:first-child .calendar-table__item {
border-width: 2px;
}
.calendar-table__inactive .calendar-table__item {
color: #DCDCE3;
cursor: default;
}
.calendar-table__inactive .calendar-table__item:hover {
background: transparent;
box-shadow: none;
}
.calendar-table__inactive.calendar-table__event .calendar-table__item {
color: #fff;
opacity: 0.25;
}
.calendar-table__inactive.calendar-table__event .calendar-table__item:hover {
background: #00788a;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
@ -6940,7 +6888,6 @@ main {
font-weight: 600;
margin-bottom: 16px;
}
.events__tag {
background: #00788a;
border: 2px solid #FEFEFE;
@ -6954,11 +6901,9 @@ main {
padding: 5px 2px;
text-align: center;
}
.events__tag--highlighted {
background: #FDCA40;
}
.events__item {
background: #fff;
border-left: 8px solid #00788a;
@ -6970,11 +6915,9 @@ main {
align-items: center;
margin-bottom: 16px;
}
.events__item--left {
width: calc(100% - 76px);
}
.events__name {
font-size: 12px;
font-weight: 700;
@ -6982,7 +6925,6 @@ main {
display: block;
margin-bottom: 6px;
}
.events__date {
font-size: 12px;
color: #9FAAB7;
@ -7034,46 +6976,38 @@ main {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
@keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}

View File

@ -1,23 +1,19 @@
@charset "UTF-8";
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Regular.ttf");
font-weight: normal;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-SemiBold.ttf");
font-weight: 600;
}
@font-face {
font-family: "Titillium Web";
src: url("/fonts/TitilliumWeb-Bold.ttf");
font-weight: 700;
}
form {
max-width: 100%;
padding: 0 0.45rem 0 0.45rem;
@ -70,8 +66,7 @@ input[type=file] {
display: inline-flex;
}
input,
select {
input, select {
border: grey solid 2px;
border-radius: 4px;
background-color: transparent;
@ -289,8 +284,7 @@ span.toggle__text.sde-blue {
font-family: "Titillium Web";
}
html,
body {
html, body {
width: 100%;
margin: 0;
padding: 0;
@ -538,7 +532,6 @@ a {
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
.fa,
.fas,
.far,
@ -618,7 +611,6 @@ a {
margin-left: 2.5em;
padding-left: 0;
}
.fa-ul > li {
position: relative;
}
@ -652,7 +644,6 @@ a {
.fab.fa-pull-left {
margin-right: 0.3em;
}
.fa.fa-pull-right,
.fas.fa-pull-right,
.far.fa-pull-right,
@ -675,7 +666,6 @@ a {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
@ -685,12 +675,10 @@ a {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.fa-rotate-90 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
transform: rotate(90deg);
@ -716,8 +704,7 @@ a {
transform: scale(1, -1);
}
.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
transform: scale(-1, -1);
}
@ -763,7 +750,6 @@ a {
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.fa-500px:before {
content: "\F26E";
}
@ -6567,8 +6553,7 @@ readers do not read off random characters that represent icons */
width: 1px;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
.sr-only-focusable:active, .sr-only-focusable:focus {
clip: auto;
height: auto;
margin: 0;
@ -6581,7 +6566,6 @@ readers do not read off random characters that represent icons */
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
@font-face {
font-family: "Font Awesome 5 Free";
font-style: normal;
@ -6590,7 +6574,6 @@ readers do not read off random characters that represent icons */
src: url("/webfonts/fa-solid-900.eot");
src: url("/webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("/webfonts/fa-solid-900.woff2") format("woff2"), url("/webfonts/fa-solid-900.woff") format("woff"), url("/webfonts/fa-solid-900.ttf") format("truetype"), url("/webfonts/fa-solid-900.svg#fontawesome") format("svg");
}
.fa,
.fas {
font-family: "Font Awesome 5 Free";
@ -6629,8 +6612,7 @@ main {
margin: 7rem 0 5rem 0;
}
header,
#menu {
header, #menu {
padding: 1.25rem 1.75rem 0 1.75rem;
}
@ -6680,11 +6662,9 @@ main {
justify-content: center;
}
}
.mock-up-link {
display: none;
}
@media (min-width: 768px) {
.mock-up-link {
display: block;
@ -6698,7 +6678,6 @@ main {
max-width: 414px;
overflow-y: auto;
}
@media (min-width: 415px) {
.main-container-wrapper {
box-shadow: 0px 32px 47px rgba(32, 23, 23, 0.09);
@ -6718,17 +6697,14 @@ main {
top: -25px;
width: 80px;
}
.header__btn .icon {
display: inline-block;
}
.header__btn--left {
left: -25px;
padding-left: 38px;
text-align: left;
}
.header__btn--right {
padding-right: 32px;
right: -25px;
@ -6740,12 +6716,10 @@ main {
padding: 16px;
margin-bottom: 24px;
}
.calendar-container__header {
display: flex;
justify-content: space-between;
}
.calendar-container__btn {
background: transparent;
border: 0;
@ -6754,7 +6728,6 @@ main {
outline: none;
color: #E9E8E8;
}
.calendar-container__title {
color: #222741;
font-size: 20px;
@ -6769,7 +6742,6 @@ main {
margin-top: 12px;
width: 100%;
}
.calendar-table__item {
border-radius: 50%;
color: #424588;
@ -6782,21 +6754,17 @@ main {
justify-content: center;
cursor: pointer;
}
.calendar-table__item:hover > span {
color: white;
}
.calendar-table__row {
display: flex;
justify-content: center;
}
.calendar-table__header {
border-bottom: 2px solid #F2F6F8;
margin-bottom: 4px;
}
.calendar-table__header .calendar-table__col {
display: inline-block;
color: #99A4AE;
@ -6808,115 +6776,95 @@ main {
width: 40px;
height: 18px;
}
@media (min-width: 350px) {
.calendar-table__header .calendar-table__col {
width: 46px;
height: 20.7px;
}
}
@media (min-width: 390px) {
.calendar-table__header .calendar-table__col {
width: 56px;
height: 25.2px;
}
}
.calendar-table__body .calendar-table__col {
width: 40px;
height: 40px;
border-radius: 50%;
}
@media (min-width: 350px) {
.calendar-table__body .calendar-table__col {
width: 46px;
height: 46px;
}
}
@media (min-width: 390px) {
.calendar-table__body .calendar-table__col {
width: 56px;
height: 56px;
}
}
@media (min-width: 410px) {
.calendar-table__body .calendar-table__col {
width: 56px;
height: 56px;
}
}
@media (min-width: 460px) {
.calendar-table__body .calendar-table__col {
width: 61px;
height: 61px;
}
}
.calendar-table__body .calendar-table__col.selected {
background: #00788a;
transition: all 0.3s ease-in;
outline: none;
}
.calendar-table__today .calendar-table__item {
border-color: #FEFEFE;
background-color: #00788a;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
}
.calendar-table__event .calendar-table__item {
background-color: #00788a;
border-color: #FEFEFE;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
color: #fff;
}
.calendar-table__event--long {
overflow-x: hidden;
}
.calendar-table__event--long .calendar-table__item {
border-radius: 0;
}
.calendar-table__event--start .calendar-table__item {
border-left: 2px solid #fff;
border-radius: 50% 0 0 50%;
}
.calendar-table__event--start.calendar-table__col:last-child .calendar-table__item {
border-width: 2px;
}
.calendar-table__event--end .calendar-table__item {
border-right: 2px solid #fff;
border-radius: 0 50% 50% 0;
}
.calendar-table__event--end.calendar-table__col:first-child .calendar-table__item {
border-width: 2px;
}
.calendar-table__inactive .calendar-table__item {
color: #DCDCE3;
cursor: default;
}
.calendar-table__inactive .calendar-table__item:hover {
background: transparent;
box-shadow: none;
}
.calendar-table__inactive.calendar-table__event .calendar-table__item {
color: #fff;
opacity: 0.25;
}
.calendar-table__inactive.calendar-table__event .calendar-table__item:hover {
background: #00788a;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
@ -6940,7 +6888,6 @@ main {
font-weight: 600;
margin-bottom: 16px;
}
.events__tag {
background: #00788a;
border: 2px solid #FEFEFE;
@ -6954,11 +6901,9 @@ main {
padding: 5px 2px;
text-align: center;
}
.events__tag--highlighted {
background: #FDCA40;
}
.events__item {
background: #fff;
border-left: 8px solid #00788a;
@ -6970,11 +6915,9 @@ main {
align-items: center;
margin-bottom: 16px;
}
.events__item--left {
width: calc(100% - 76px);
}
.events__name {
font-size: 12px;
font-weight: 700;
@ -6982,7 +6925,6 @@ main {
display: block;
margin-bottom: 6px;
}
.events__date {
font-size: 12px;
color: #9FAAB7;
@ -7034,51 +6976,42 @@ main {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
@keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
html,
body {
html, body {
background-color: #666666;
}
@ -7094,8 +7027,7 @@ main {
color: white;
}
input,
select {
input, select {
border-color: white;
}
@ -7123,4 +7055,3 @@ input::placeholder {
.ql-align-center > strong {
color: #ffffff;
}

View File

@ -27,11 +27,19 @@
<tr>
<th>Feedback Besked</th>
<th>Ris el. Ros</th>
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
</tr>
@foreach($feedback as $fb)
<tr>
<td>{{ $fb->message }}</td>
<td>{{ $fb->suggestion_form }}</td>
<td><form method="post" action="{{ route("feedbacks.destroy", [ "feedback" => $fb ]) }}" class="w-100 nostyle">
@csrf
@method("delete")
<button onclick="return confirm('Are you sure you want to delete?');" class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
</form>
</td>
</tr>
@endforeach
</table>

View File

@ -36,7 +36,6 @@
<h1 class="text-center sde-blue mb-0" style="margin-bottom: 2rem">{{ __('msg.aktiviteter') }}</h1>
@if(!$events->isEmpty())
@foreach($events as $event)
<form method="get" action="{{ route("userevents.create") }}" id="form{{$event->id}}">
<div class="card">
@if($event->resource_id !== null)
<div class="header" style="background-size: cover; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $event->resource_id)->first()->filename) }}');">
@ -57,17 +56,65 @@
{!! session()->get('error#' . $event->id) !!}
{!! session()->get('signup#' . $event->id) !!}
<div class="row" style="justify-content: space-between; margin-top: 16px;">
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:;" onclick="document.getElementById('form{{$event->id}}').submit();" >{{__('msg.tilmeld')}}</a>
@if (count(\App\UserEvent::query()->where('event_id', '=', $event->id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCallCancel({{ $event->id }})" >{{__('msg.afmeld')}}</a>
@else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}}
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $event->id }})" >{{__('msg.tilmeld')}}</a>
@endif
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $event->id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $event->id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
</div>
</div>
</form>
@endforeach
@else
<p class="text-center" style="margin-bottom: auto">{{__('msg.dereringenaktiviteter')}}!</p>
@endif
<a href="{{ route("userevents.index") }}" style="margin-top: auto" class="mt-2 btn text-center btn-sde-blue" id="tilmeld">{{__('msg.setilmeldteaktiviteter')}}</a>
<div id="snackbar"></div>
</main>
@endsection
@section("scripts")
<script type="text/javascript">
function snackbar(data) {
var x = document.getElementById("snackbar");
x.innerHTML = data;
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
}
function ajaxCall(event_id) {
axios.post("{{ route("userevents.createajax") }}",
{
event_id: event_id
}
).then(function (response) {
var data = response.data;
snackbar(data);
setTimeout(function(){document.location.reload(false)}, 2000);
}).catch(function (error) {
console.log(error);
});
}
function ajaxCallCancel(event_id) {
axios.post("{{ route("userevents.createajaxcancel") }}",
{
event_id: event_id
}
).then(function (response) {
var data = response.data;
snackbar(data);
setTimeout(function(){document.location.reload(false)}, 2000);
}).catch(function (error) {
console.log(error);
});
}
</script>
@endsection

View File

@ -57,7 +57,11 @@
<div class="container">
{!! \App\Helpers::closetags(substr($userevent->description, 0, 300) )!!}
<div class="row" style="justify-content: space-between;">
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:;" onclick="return confirm('Are you sure you want to remove this event?');" >{{__('msg.afmeld')}}</a>
@if (count(\App\UserEvent::query()->where('event_id', '=', $userevent->id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCallCancel({{ $userevent->id }})" id="t">{{__('msg.afmeld')}}</a>
@else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}}
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $userevent->id }})" >{{__('msg.tilmeld')}}</a>
@endif
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $userevent->id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $userevent->id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
@ -68,6 +72,50 @@
@else
<p class="text-center">{{__('msg.duharikketilmeldtdignogenaktiviteter')}}!</p>
@endif
<a href="{{ route("events.index") }}" type="submit" style="margin-top: auto" class="mt-2 btn text-center btn-sde-blue">{{__('msg.tilbage')}}</a>
<a onclick="window.history.back()" type="submit" style="margin-top: auto" class="mt-2 btn text-center btn-sde-blue">{{__('msg.tilbage')}}</a>
<div id="snackbar"></div>
</main>
@endsection
@section("scripts")
<script type="text/javascript">
function snackbar(data) {
var x = document.getElementById("snackbar");
x.innerHTML = data;
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
}
function ajaxCall(event_id) {
axios.post("{{ route("userevents.createajax") }}",
{
event_id: event_id
}
).then(function (response) {
var data = response.data;
snackbar(data);
setTimeout(function(){document.location.reload(false)}, 2000);
}).catch(function (error) {
console.log(error);
});
}
function ajaxCallCancel(event_id) {
axios.post("{{ route("userevents.createajaxcancel") }}",
{
event_id: event_id
}
).then(function (response) {
var data = response.data;
snackbar(data);
setTimeout(function(){document.location.reload(false)}, 2000);
}).catch(function (error) {
console.log(error);
});
}
</script>
@endsection

View File

@ -17,7 +17,7 @@
<span>{{__('msg.telefon')}} Nr.:</span>
<input type="text" name="phone" id="phone" value="{{ Auth::user()->phone }}" required>
<button type="submit" class="btn text-center btn-sde-blue mt-1">{{__('msg.rediger')}}</button>
<a href="{{ route('users.account') }}" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
<a onclick="window.history.back()" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
</form>
</main>
@endsection

View File

@ -28,7 +28,7 @@
{!! session()->get('error#notsamepass') !!}
{!! session()->get('error#oldpass') !!}
<button type="submit" style="margin-top: auto;" class="btn text-center btn-sde-blue mt-1">{{__('msg.rediger')}}</button>
<a href="{{ route('users.account') }}" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
<a onclick="window.history.back()" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
</form>
</main>

View File

@ -24,7 +24,7 @@
<span>{{__('msg.profilbillede')}}:</span>
<input type="file" name="resource">
<button type="submit" class="btn text-center btn-sde-blue mt-1">{{__('msg.ændrer')}}</button>
<a href="{{ route('users.account') }}" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
<a onclick="window.history.back()" class="btn text-center btn-sde-blue mt-1">{{__('msg.tilbage')}}</a>
</form>
</main>
@endsection

View File

@ -14,7 +14,7 @@
<input class="appinput" type="email" name="email" placeholder="Email" required>
{!! session()->get('errornosuchuser') !!}
<input class="btn btn-dark" type="submit" value="Send reset mail">
<a class="btn btn-dark text-center" href="{{ route("users.login") }}">Tilbage</a>
<a class="btn btn-dark text-center" onclick="window.history.back()">Tilbage</a>
</form>
</main>
@endsection