-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add migration and models to faq sections and subsections from feature/new-faq * fix faq test * create new admin modules for new faq models * create new admin modules for new faq models (cherry picked from commit 2caa326) * add missing copies * remove unnecessary template * fixes on faq admin controller * fix bug on faqsection admin controller * change type of subsections and sections ids * make improvements based on review * use of new methods from models and fixes * refactor faqsection getfaqs function * files from #400 related to the views of the new faqs * fix integration * add missing copies * refactor in partials of faq header and classes
- Loading branch information
Showing
69 changed files
with
3,118 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
$this->layout('admin/communication/layout'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
|
||
<?php $this->append() ?> | ||
|
||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
|
||
<div class="panel section-content spacer"> | ||
<div class="panel-body"> | ||
|
||
<h5><?= $this->text('admin-communications-id') ?></h5> | ||
<p id = "communication-id"><?= $this->communication->id ?></p> | ||
|
||
<h5><?= $this->text('admin-mailing-subject') ?></h5> | ||
<p><?= $this->communication->subject ?></p> | ||
|
||
<h5 class="spacer-20"><?= $this->text('regular-date') ?></h5> | ||
<p><?= $this->communication->date ?></p> | ||
|
||
<?= $this->insert('admin/partials/material_table', ['list' => $this->model_list_entries($this->mails, ['id', 'subject', 'lang', 'receivers', 'sent', 'failed', 'pending', 'success', 'status', 'percent'])]) ?> | ||
|
||
|
||
<div class="spacer-20 forms"> | ||
<p class="buttons"> | ||
<?php if (!$this->communication->isSent() && $this->communication->isActive()): ?> | ||
<a class="show-form btn btn-danger btn-lg" href="/admin/communication/cancel/<?= $this->communication->id?>"><i class="fa fa-ban"></i> <?= $this->text('admin-communications-cancel') ?></a> | ||
<?php elseif (!$this->communication->isActive() && !$this->communication->isSent()): ?> | ||
<a class="show-form btn btn-cyan btn-lg" href="/admin/communication/send/<?= $this->communication->id?>"><i class="fa fa-send"></i> <?= $this->text('admin-communications-send') ?></a> | ||
<?php endif ?> | ||
<a class="show-form btn btn-cyan btn-lg" href="/admin/communication/preview/<?= $this->communication->id?>"><i class="fa fa-eye"></i> <?= $this->text('regular-preview') ?></a> | ||
<?php if(!$this->communication->isActive()) : ?> | ||
<a class="show-form btn btn-cyan btn-lg" href="/admin/communication/edit/<?= $this->communication->id?>"><i class="fa fa-pencil"></i> <?= $this->text('regular-edit') ?></a> | ||
<?php endif ?> | ||
</p> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<?php $this->replace() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/layout'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
|
||
<?php $this->append() ?> | ||
|
||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<?= $this->form_form($this->raw('form')) ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<?php $this->append() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$this->layout('admin/container'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
<h2><?= $this->text('admin-faqs') ?></h2> | ||
|
||
<?= $this->insert('admin/partials/search_box') ?> | ||
|
||
<?= $this->supply('admin-faq-head') ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<script type="text/javascript" defer src="<?= $this->asset('js/admin/faqs.js') ?>"></script> | ||
|
||
<?php $this->append() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/layout'); | ||
|
||
$this->section('admin-search-box-addons'); | ||
|
||
if ($this->current_subsection) | ||
$keys = ['id', 'title', 'order', 'subsection', 'actions']; | ||
else | ||
$keys = ['id', 'title', 'subsection', 'actions']; | ||
?> | ||
|
||
<label for="sections-filter"><?= $this->t('admin-faq-subsections') ?></label> | ||
<div class="form form-group"> | ||
<select id="sections-filter" name="sections-list" class="form-control" style="margin-bottom:1em;" onchange="window.location.href='/admin/faq/subsection/' + this.value"> | ||
<?php if (!$this->current_subsection) : ?> | ||
<option selected="selected"><?= $this->t('admin-faq-subsections-all')?></option> | ||
<?php endif; ?> | ||
<?php foreach ($this->faq_subsections as $section => $subsections) : ?> | ||
<optgroup label="<?= $section ?>"> | ||
<?php foreach($subsections as $id => $name): ?> | ||
<option value="<?= $id ?>" <?= ($id == $this->current_subsection)? 'selected="selected"': '' ?>><?= $name; ?></option> | ||
<?php endforeach; ?> | ||
</optgroup> | ||
<?php endforeach; ?> | ||
</select> | ||
</div> | ||
|
||
<a class="btn btn-cyan" href="/admin/faq/add"><i class="fa fa-plus"></i> <?= $this->text('admin-faq-add') ?></a> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<h5><?= $this->text('admin-list-total', $this->total) ?></h5> | ||
<?= $this->insert('admin/partials/material_table', ['list' => $this->model_list_entries($this->list, $keys)]) ?> | ||
|
||
<?php $this->replace() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/section/layout'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
|
||
<?php $this->append() ?> | ||
|
||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<?= $this->form_form($this->raw('form')) ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<?php $this->append() ?> |
20 changes: 20 additions & 0 deletions
20
Resources/templates/responsive/admin/faq/section/layout.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$this->layout('admin/container'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
<h2><?= $this->text('admin-faqs') ?></h2> | ||
|
||
<?= $this->insert('admin/partials/search_box') ?> | ||
|
||
<?= $this->supply('admin-faq-head') ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<script type="text/javascript" defer src="<?= $this->asset('js/admin/faqs.js') ?>"></script> | ||
|
||
<?php $this->append() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/section/layout'); | ||
|
||
$this->section('admin-search-box-addons'); | ||
|
||
$keys = [ | ||
'id', | ||
'name', | ||
'slug', | ||
'actions' | ||
] | ||
?> | ||
|
||
<h2><?= $this->t('admin-faq-sections') ?></h2> | ||
|
||
<a class="btn btn-cyan" href="/admin/faqsection/add"><i class="fa fa-plus"></i> <?= $this->text('admin-faq-sections-add') ?></a> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<h5><?= $this->text('admin-list-total', $this->total) ?></h5> | ||
<?= $this->insert('admin/partials/material_table', ['list' => $this->model_list_entries($this->list, $keys)]) ?> | ||
|
||
<?php $this->replace() ?> |
20 changes: 20 additions & 0 deletions
20
Resources/templates/responsive/admin/faq/subsection/edit.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/subsection/layout'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
|
||
<?php $this->append() ?> | ||
|
||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<?= $this->form_form($this->raw('form')) ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<?php $this->append() ?> |
21 changes: 21 additions & 0 deletions
21
Resources/templates/responsive/admin/faq/subsection/layout.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
$this->layout('admin/container'); | ||
|
||
$this->section('admin-container-head'); | ||
|
||
?> | ||
|
||
<h2><?= $this->text('admin-faq-subsections') ?></h2> | ||
|
||
<?= $this->insert('admin/partials/search_box') ?> | ||
|
||
<?= $this->supply('admin-faq-head') ?> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('footer') ?> | ||
|
||
<script type="text/javascript" defer src="<?= $this->asset('js/admin/faqs.js') ?>"></script> | ||
|
||
<?php $this->append() ?> |
37 changes: 37 additions & 0 deletions
37
Resources/templates/responsive/admin/faq/subsection/list.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
$this->layout('admin/faq/subsection/layout'); | ||
|
||
$this->section('admin-search-box-addons'); | ||
|
||
$keys = [ | ||
'id', | ||
'name', | ||
'subsection', | ||
'order', | ||
'actions' | ||
]; | ||
?> | ||
|
||
<label for="sections-filter"><?= $this->t('admin-faq-sections') ?></label> | ||
<div class="form form-group"> | ||
<select id="sections-filter" name="sections-list" class="form-control" style="margin-bottom:1em;" onchange="window.location.href='/admin/faqsubsection/section/' + this.value"> | ||
<?php if (!$this->current_section) : ?> | ||
<option selected="selected"><?= $this->t('admin-faq-sections-all')?></option> | ||
<?php endif; ?> | ||
<?php foreach ($this->faq_sections as $section) : ?> | ||
<option value="<?= $section->id ?>" <?= ($section->id == $this->current_section)? 'selected="selected"': '' ?>><?= $section->name; ?></option> | ||
<?php endforeach; ?> | ||
</select> | ||
</div> | ||
|
||
<a class="btn btn-cyan" href="/admin/faqsubsection/add"><i class="fa fa-plus"></i> <?= $this->text('admin-faq-subsections-add') ?></a> | ||
|
||
<?php $this->replace() ?> | ||
|
||
<?php $this->section('admin-container-body') ?> | ||
|
||
<h5><?= $this->text('admin-list-total', $this->total) ?></h5> | ||
<?= $this->insert('admin/partials/material_table', ['list' => $this->model_list_entries($this->list, $keys)]) ?> | ||
|
||
<?php $this->replace() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php $this->layout('faq/layout') ?> | ||
|
||
<?php $this->section('faq-content') ?> | ||
|
||
<!-- Start -- Cesc --> | ||
<?= $this->insert('faq/partials/header') ?> | ||
|
||
<section class="container step1"> | ||
<div class="row"> | ||
<?php foreach ($this->faq_sections as $section): ?> | ||
<?php if ($section_faq = $section->getFaqs()): ?> | ||
<article class="col-sm-6 col-lg-3"> | ||
<div class="faqs_module card"> | ||
<header class="<?= $section->slug ?>"> | ||
<h2><?= $section->name ?></h2> | ||
</header> | ||
<ul> | ||
<?php foreach ($section_faq as $faq): ?> | ||
<?php $faq_id = $faq->slug ?? $faq->id; ?> | ||
<li><a href="<?= '/faq/' . $section->slug . '/' . $faq_id ?>"><?= $faq->title ?></a></li> | ||
<?php endforeach; ?> | ||
</ul> | ||
<footer class="see_everything"> | ||
<hr><a href="<?= '/faq/'.$section->slug ?>"><?= $section->button_action ?></a> | ||
</footer> | ||
</div> | ||
</article> | ||
<?php endif; ?> | ||
<?php endforeach; ?> | ||
|
||
<?php $this->replace() ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php $this->layout('faq/layout') ?> | ||
|
||
<?php $this->section('faq-content') ?> | ||
|
||
<nav id="breadcrumb" class="container-fluid"> | ||
<div class="container"> | ||
<a href="/faq"><?= $this->t('faq-title') ?></a><span class="slash"> / </span><a href="<?= '/faq/'.$this->faq_section->slug ?>"><?= $this->faq_section->name ?></a><span class="slash"> / </span><?= $this->faq->title ?> | ||
</div> | ||
</nav> | ||
|
||
<?= $this->insert('faq/partials/header') ?> | ||
|
||
<section class="step3"> | ||
<div class="row"> | ||
<article class="col-sm-8 col-sm-offset-1 col-sm-push-3"> | ||
<?= $this->markdown($this->faq->description) ?> | ||
<footer class="unsolved_faq"> | ||
<a href="/contact" class="btn"><?= $this->t('faq-unsolved-footer') ?></a> | ||
</footer> | ||
</article> | ||
<aside class="col-sm-3 col-sm-pull-9" id="accordion"> | ||
<?php foreach ($this->subsections as $subsection): ?> | ||
<?php $faq_subsection = $subsection->getFaqs(); ?> | ||
<section> | ||
<h3 role="button" data-toggle="collapse" href="<?= '#collapse-'.$subsection->id ?>" aria-expanded="<?= $this->faq->subsection_id==$subsection->id ? 'true' : 'false' ?>"> | ||
<?= $subsection->name ?> | ||
</h3> | ||
<ul class="description collapse <?= $this->faq->subsection_id==$subsection->id ? 'in' : 'false' ?>" id="<?= 'collapse-'.$subsection->id ?>"> | ||
<?php foreach($faq_subsection as $faq): ?> | ||
<?php if($faq->id==$this->faq->id): ?> | ||
<li class="select"><?= $faq->title ?></li> | ||
<?php else: ?> | ||
<li> | ||
<a href="<?= '/faq/'.$this->faq_section->slug.'/'.$faq->slug ?>"><?= $faq->title ?></a> | ||
</li> | ||
<?php endif; ?> | ||
<?php endforeach; ?> | ||
</ul> | ||
</section> | ||
<?php endforeach; ?> | ||
</aside> | ||
</div> | ||
</section> | ||
|
||
<?php $this->replace() ?> |
Oops, something went wrong.