PHP Classes

File: aksara/Modules/Testimonials/Views/index.php

Recommend this page to a friend!
  Packages of Aby Dahana   Aksara   aksara/Modules/Testimonials/Views/index.php   Download  
File: aksara/Modules/Testimonials/Views/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: feat: enhance user creation and logging with timestamps and creator references

- Updated MainSeeder to include 'created_at' timestamp and 'created_by' reference for new users.
- Modified error pages to improve user experience with updated messages and button styles.
- Refactored Home controller to use 'updated_at' instead of 'updated_timestamp' for blog entries.
- Updated various views to reflect changes in timestamp fields.
- Enhanced global JavaScript to display 'created_at' instead of 'timestamp' in user interactions.
- Added new translation keys for 'Created At' and 'Created By' across multiple languages.
- Cleaned up translations by removing unused keys and ensuring consistency across language files.
Refactor code for improved readability and consistency across multiple views

- Rearranged comments and code blocks for better organization in database.php, error_404.php, error_exception.php, error_exception.php (HTML), index.php, requirement.php, security.php, system.php, and Home module views.
- Ensured consistent formatting and indentation throughout the files.
- Added missing PHP opening tags and improved variable initialization.
- Enhanced error handling and user feedback in error views.
- Updated HTML structure for better semantic clarity and accessibility.
Date: 3 days ago
Size: 2,817 bytes
 

Contents

Class file image Download
<?php

/**
 * @var mixed $results
 * @var mixed $meta
 * @var mixed $pagination
 */
if ($results): ?>
<section class="section-padding border-fade-bottom fade-in">
        <div class="container position-relative text-center text-md-start fade-in">
            <h1 class="display-4 fw-bold text-dark">
                <?= $meta->title; ?>
</h1>
            <p class="fs-5 text-muted mb-0">
                <?= truncate($meta->description, 256); ?>
</p>
        </div>
    </section>
<?php endif; ?>

<section class="section-padding">
    <div class="container">
        <?php if ($results): ?>
<?php foreach ($results as $key => $val): ?>
<div class="mb-3 fade-in">
                    <div class="row align-items-center mb-4">
                        <div class="col-3 col-md-3 pt-2 order-sm-<?= ($key %2 === 0 ? '0' : '1'); ?>">
                            <img src="<?= get_image('testimonials', $val->photo, 'thumb'); ?>" class="img-fluid w-100 rounded-circle p-2 border">
                        </div>
                        <div class="col-9 col-md-9 order-sm-<?= ($key %2 === 0 ? '1' : '0'); ?>">
                            <blockquote class="blockquote">
                                <h2>
                                    <?= $val->testimonial_title; ?>
</h2>
                                <div class="fs-5 mb-4">
                                    <?= $val->testimonial_content; ?>
</div>
                                <footer class="blockquote-footer">
                                    <b class="text-primary"><?= $val->first_name . ' ' . $val->last_name; ?></b>, <?= $val->created_at; ?>
</footer>
                            </blockquote>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>

            <?= pagination($pagination); ?>
<?php else: ?>
<div class="py-5 fade-in">
                <div class="text-center">
                    <img src="<?= base_url('assets/yao-ming.png'); ?>" width="128" alt="404" />
                </div>
                <h2 class="text-center">
                    <?= phrase('No testimonial is found!'); ?>
</h2>
                <p class="fs-5 text-center">
                    <?= phrase('No testimonial is available at the moment.'); ?>
</p>
                <p class="text-center">
                    <a href="<?= base_url(); ?>" class="btn btn-outline-dark rounded-pill px-5 --xhr">
                        <i class="mdi mdi-arrow-left"></i> <?= phrase('Back to Home'); ?>
</a>
                </p>
            </div>
        <?php endif; ?>
</div>
</section>