Skip to content

Commit

Permalink
Merge pull request #69 from mateusKoppe/sectionValues
Browse files Browse the repository at this point in the history
Sessão valores e melhorias visuais
  • Loading branch information
mateusKoppe authored Oct 7, 2019
2 parents b72a39d + d32bb29 commit c73d8e1
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 17 deletions.
11 changes: 11 additions & 0 deletions App/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,15 @@ public function home ($request, $response, $args) {
View::render('layout/website/footer', $data);
return $response;
}

public function dashboard ($request, $response, $args) {
AuthHelper::restrictToPermission(User::USER_LEVEL_ADMIN);
$user = AuthHelper::getAuthenticatedUser();

$data = compact(['user']);
View::render('layout/admin/header', $data);
View::render('dashboard', $data);
View::render('layout/admin/footer', $data);
return $response;
}
}
62 changes: 58 additions & 4 deletions App/Views/auth/profile.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
use App\Helpers\UtilsHelper;
use App\Models\Event;
use App\Models\Payment;
use App\Models\User;
?>

<div class="profile">
Expand All @@ -11,6 +10,9 @@
<h1 class="profile__title title">Perfil</h1>
</div>
<div class="col text-right">
<?php if ($user->isLevel(User::USER_LEVEL_ADMIN)): ?>
<a href="<?= UtilsHelper::base_url("/admin") ?>" class="btn btn--medium btn--secondary">Dashboard</a>
<?php endif; ?>
<a href="<?= UtilsHelper::base_url("/logout") ?>" class="btn btn--medium btn--primary">Sair</a>
</div>
</div>
Expand Down Expand Up @@ -73,8 +75,60 @@
<?php endforeach; ?>
</ul>
<?php else: ?>
Nenhuma incrição confirmada até o momento. <br>
Por favor, contate o CA para efetuar o pagamento de sua inscrição.
<p> Nenhuma incrição confirmada até o momento. <br>
Por favor, contate o CA para efetuar o pagamento de sua inscrição.</p>
<div>
<div>
<p>Confira a tabela de preços da semana acâdemica!</p>
<table class="table table--lg table--bordered">
<tr class="bg-primary-light">
<th>Lote</th>
<?php if($user->isInternal()): ?>
<th>Estudante UFFS</th>
<?php else: ?>
<th>Visitante</th>
<?php endif; ?>
</tr>
<tr>
<td><b>1º lote</b></td>
<?php if($user->isInternal()): ?>
<td>R$ 5,00</td>
<?php else: ?>
<td>R$ 30,00</td>
<?php endif; ?>
</tr>
<tr>
<td><b>2º lote</b></td>
<?php if($user->isInternal()): ?>
<td>R$ 10,00</td>
<?php else: ?>
<td>R$ 35,00</td>
<?php endif; ?>
</tr>
<tr>
<td><b>No dia</b></td>
<?php if($user->isInternal()): ?>
<td>R$ 15,00</td>
<?php else: ?>
<td>R$ 40,00</td>
<?php endif; ?>
</tr>
</table>
</div>
</div>
<br>
<h2 class="title" scroll-sensitive="animate-top-down">Formas de pagamento</h2>
<div class="row">
<div class="col-lg-6">
<h3 class="title">Transferencia bancaria</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Praesentium cum nulla laborum, sunt omnis temporibus nihil dolores</p>
</div>
<div class="col-lg-6">
<h3 class="title">Dinheiro</h3>
<p>Pagamento por dinheiro nas mãos de algum membro do CA. Para entrar com contato em o CA envie um e-mail para ... ou entre em contato pelas redes sociais:</p>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions App/Views/dashboard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="jumbotron">
<div class="container">
<h1>Painel Administrativo</h1>
<p>Gerencie os dados da SACC</p>
</div>
</div>
2 changes: 1 addition & 1 deletion App/Views/event/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<select name="fk_competition" class="form-control">
<option value=""></option>
<?php foreach($competitions as $id => $competition): ?>
<option value="<?= $id ?>"> <?= $competition['title'] ?></option>
<option value="<?= $id ?>"> <?= $competition->title ?></option>
<?php endforeach; ?>
</select>
</div>
Expand Down
2 changes: 1 addition & 1 deletion App/Views/event/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<select name="fk_competition" class="form-control">
<option value=""></option>
<?php foreach($competitions as $id => $competition): ?>
<option value="<?= $id ?>" <?= (@$event->fk_competition == $id ? 'selected="selected"' : '') ?>> <?= $competition['title'] ?></option>
<option value="<?= $id ?>" <?= (@$event->fk_competition == $id ? 'selected="selected"' : '') ?>> <?= $competition->title ?></option>
<?php endforeach; ?>
</select>
</div>
Expand Down
62 changes: 54 additions & 8 deletions App/Views/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</div>
</section>

<section class="speakers section" id="speakers">
<!-- <section class="speakers section" id="speakers">
<div class="container">
<h2 class="speakers__title title" scroll-sensitive="animate-top-down">Palestrantes</h2>
<div class="spearkers__list">
Expand Down Expand Up @@ -113,13 +113,13 @@
</div>
</div>
</div>
</section>
</section> -->

<section class="programming section" id="programming">
<section class="programming section" id="programming">
<div class="container">
<h2 class="programming__title title" scroll-sensitive="animate-top-down">Programação</h2>
<h2 class="programming__title title" scroll-sensitive="animate-top-down">Programação</h2>

<?php foreach ($data['events'] as $event_per_day): ?>
<?php foreach ($data['events'] as $event_per_day): ?>
<?php $event_head = reset($event_per_day) ?>
<div class="programming-item">
<div class="row">
Expand All @@ -139,8 +139,10 @@
</span><br>
<span> <?= $event->description?> </span> <br>

<?php if (isset($event->speaker)): ?>
<span class="event__strong"> Palestrante: </span>
<span> <?= isset($event->speaker) ? $event->speaker : 'Fausto Silva' ?> </span><br>
<span> <?= $event->speaker ?> </span><br>
<?php endif; ?>

<span class="event__strong"> Início: </span>
<span> <?= $event->time . ' hrs'?> </span><br>
Expand All @@ -157,6 +159,50 @@
</div>

</div>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</section>

<section class="values section" id="values">
<div class="container">
<h2 class="values__title title" scroll-sensitive="animate-top-down">Valores</h2>
<div class="row justify-content-center">
<div class="col-lg-9">
<p>Confira a tabela de preços da semana acâdemica!</p>
<table class="table table--lg table--bordered">
<tr class="bg-primary-light">
<th>Lote</th>
<th>Estudante UFFS</th>
<th>Visitante</th>
</tr>
<tr>
<td><b>1º lote</b></td>
<td>R$ 5,00</td>
<td>R$ 30,00</td>
</tr>
<tr>
<td><b>2º lote</b></td>
<td>R$ 10,00</td>
<td>R$ 35,00</td>
</tr>
<tr>
<td><b>No dia</b></td>
<td>R$ 15,00</td>
<td>R$ 40,00</td>
</tr>
</table>
</div>
</div>
<h3 class="values__subtitle title" scroll-sensitive="animate-top-down">Formas de pagamento</h2>
<div class="row">
<div class="col-lg-6">
<h3 class="title text-center">Transferencia bancaria</h3>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Praesentium cum nulla laborum, sunt omnis temporibus nihil dolores</p>
</div>
<div class="col-lg-6">
<h3 class="title text-center">Dinheiro</h3>
<p>Pagamento por dinheiro nas mãos de algum membro do CA. Para entrar com contato em o CA envie um e-mail para ... ou entre em contato pelas redes sociais:</p>
</div>
</div>
</div>
</section>
7 changes: 5 additions & 2 deletions App/Views/layout/website/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/vendor/fontawesome/css/all.min.css") ?>">
<!-- index CSS -->
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/css/website/fonts.css") ?>">
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/css/website/table.css") ?>">
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/css/website/helpers.css") ?>">
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/css/website/index.css") ?>">
<link rel="stylesheet" href="<?= UtilsHelper::base_url("/css/website/card.css") ?>">
Expand Down Expand Up @@ -51,8 +52,9 @@
<div class="col-md-10 d-none d-md-block">
<nav class="navbar__menu">
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#about")?>">Sobre</a>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#speakers")?>">Palestrantes</a>
<!-- <a class="navbar__archor" href="<?= UtilsHelper::base_url("/#speakers")?>">Palestrantes</a> -->
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#programming")?>">Programação</a>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#values")?>">Valores</a>
<?php if ($_user): ?>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/perfil")?>">Perfil</a>
<?php else: ?>
Expand All @@ -71,8 +73,9 @@
<div class="menu-mobile">
<nav id="menu" class="menu-mobile__content">
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#about")?>">Sobre</a>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#speakers")?>">Palestrantes</a>
<!-- <a class="navbar__archor" href="<?= UtilsHelper::base_url("/#speakers")?>">Palestrantes</a> -->
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#programming")?>">Programação</a>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/#values")?>">Valores</a>
<?php if ($_user): ?>
<a class="navbar__archor" href="<?= UtilsHelper::base_url("/perfil")?>">Perfil</a>
<?php else: ?>
Expand Down
1 change: 1 addition & 0 deletions App/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
$app->get('/perfil', 'App\Controllers\AuthController:profile');
$app->post('/perfil/atualizar', 'App\Controllers\AuthController:profileUpdate');

$app->get('/admin', 'App\Controllers\HomeController:dashboard');
$app->get('/admin/permissoes', 'App\Controllers\UserController:index');
$app->post('/admin/permissoes/{id}', 'App\Controllers\UserController:update');

Expand Down
4 changes: 4 additions & 0 deletions public/css/website/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
color: #00693E !important;
}

.bg-primary-light {
background-color: rgba(0, 155, 62, .1);
}

.title.title--lg {
font-size: 50px;
}
16 changes: 15 additions & 1 deletion public/css/website/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
}

/* Section */
.speakers {
.speakers, .programming {
background-color: rgba(0, 105, 62, .1);
}

Expand Down Expand Up @@ -178,3 +178,17 @@
color: #00693c;
}

/* Values */
.values__title {
text-align: center;
color: #00693c;
font-size: 40px;
margin: .3em;
}

.values__subtitle {
text-align: center;
color: #00693c;
font-size: 32px;
margin: 1em 0 .5em 0;
}
4 changes: 4 additions & 0 deletions public/css/website/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
text-align: left;
}

.table--bordered td, .table--bordered th{
border: 1px solid #dee2e6;
}

.table--stripped > thead > tr,
.table--stripped > tbody > tr {
border: none;
Expand Down

0 comments on commit c73d8e1

Please sign in to comment.