mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 17:33:19 +03:00
Minor refactoring to helper files
This commit is contained in:
parent
e084ee913f
commit
df8417a8cc
4 changed files with 11 additions and 13 deletions
|
@ -24,8 +24,6 @@
|
||||||
*/
|
*/
|
||||||
function asset_url($uri = '', $protocol = NULL)
|
function asset_url($uri = '', $protocol = NULL)
|
||||||
{
|
{
|
||||||
$CI =& get_instance();
|
|
||||||
|
|
||||||
$debug = config('debug');
|
$debug = config('debug');
|
||||||
|
|
||||||
$cache_busting_token = ! $debug ? '?' . config('cache_busting_token') : '';
|
$cache_busting_token = ! $debug ? '?' . config('cache_busting_token') : '';
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
/**
|
/**
|
||||||
* Print an exception to an HTML text.
|
* Print an exception to an HTML text.
|
||||||
*
|
*
|
||||||
* This method is used to display exceptions in a way that is useful and easy
|
* This method is used to display exceptions in a way that is useful and easy for the user to see. It uses the
|
||||||
* for the user to see. It uses the Bootstrap CSS accordion markup to display
|
* Bootstrap CSS accordion markup to display the message and when the user clicks on it the exception trace will be
|
||||||
* the message and when the user clicks on it the exception trace will be revealed.
|
* revealed. We display only one exceptions at a time because the user needs to be able to display the details of each
|
||||||
* We display only one exceptions at a time because the user needs to be able
|
* exception separately.
|
||||||
* to display the details of each exception seperately. (In contrast with js).
|
|
||||||
*
|
*
|
||||||
* @param Exception $exception The exception to be displayed.
|
* @param Exception $exception The exception to be displayed.
|
||||||
|
*
|
||||||
* @return string Returns the html markup of the exception.
|
* @return string Returns the html markup of the exception.
|
||||||
*/
|
*/
|
||||||
function exceptionToHtml($exception)
|
function exceptionToHtml($exception)
|
||||||
|
@ -30,8 +30,7 @@ function exceptionToHtml($exception)
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle" data-toggle="collapse"
|
<a class="accordion-toggle" data-toggle="collapse"
|
||||||
data-parent="#error-accordion" href="#error-technical">' .
|
data-parent="#error-accordion" href="#error-technical">' . $exception->getMessage() . '
|
||||||
$exception->getMessage() . '
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="error-technical" class="accordion-body collapse">
|
<div id="error-technical" class="accordion-body collapse">
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
* ---------------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a string date is valid for insertion or update
|
* Check if a string date is valid for insertion or update to the database.
|
||||||
* to the database.
|
|
||||||
*
|
*
|
||||||
* @param string $datetime The given date.
|
* @param string $datetime The given date.
|
||||||
|
*
|
||||||
* @return bool Returns the validation result.
|
* @return bool Returns the validation result.
|
||||||
*
|
*
|
||||||
* @link http://stackoverflow.com/a/8105844/1718162 [SOURCE]
|
* @link http://stackoverflow.com/a/8105844/1718162 [SOURCE]
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
* Render the HTML output of a timezone dropdown element.
|
* Render the HTML output of a timezone dropdown element.
|
||||||
*
|
*
|
||||||
* @param string $attributes HTML element attributes of the dropdown.
|
* @param string $attributes HTML element attributes of the dropdown.
|
||||||
* @return false|string
|
*
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function render_timezone_dropdown($attributes = '')
|
function render_timezone_dropdown($attributes = '')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue