This file contains hidden or 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
<template> | |
<div> | |
<!-- Dynamic list of fields from template --> | |
<Component v-for="(field, index) in fields" :is="field.component" :key="index" v-model="fields[field.name]" /> | |
</div> | |
</template> | |
<script> |
This file contains hidden or 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
<?php | |
/** | |
* This bit of code takes an array of address blocks---with a newline break separating | |
* street address from city, state, and zip code---and formats each piece of the address | |
* block into an HTML table. | |
* | |
* With each address block split into a table, we can easily paste it into a CSV spreadsheet. | |
* | |
* We go from: |
This file contains hidden or 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
{% set relations = TimberPost(post.get_field('relationship_field')) %} | |
{% if relations %} | |
{% for relation in relations %} | |
<h2>{{relation.title}}</h2> | |
{% endfor %} | |
{% endif %} |
This file contains hidden or 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
<?php | |
# app/Model/Animal.php | |
class Animal extends AppModel { | |
} |
This file contains hidden or 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
<?php | |
// JqueryExamplesController.php | |
class JqueryExamplesController extends AppController { | |
/** | |
* Example of an autocomplete field using jQuery UI | |
* with JSON and AJAX | |
* |
This file contains hidden or 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
/** | |
* add method | |
* | |
* @return void | |
*/ | |
public function add() { | |
# jQuery Auto Complete | |
if ($this->request->is('ajax')) { | |
$this->loadModel('Client'); |
This file contains hidden or 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
<!-- File: app/Model/Job.php --> | |
<?php | |
<?php | |
App::uses('AppModel', 'Model'); | |
/** | |
* Job Model | |
* | |
* @property Client $Client |
This file contains hidden or 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
Missing Helper | |
Error: AuthHelper could not be found. | |
Error: Create the class AuthHelper below in file: app\View\Helper\AuthHelper.php | |
<?php | |
class AuthHelper extends AppHelper { | |
} |
This file contains hidden or 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
<!-- File: /app/View/Jobs/view.ctp --> | |
<?php echo $this->Html->css('jquery-ui-1.10.4.custom'); ?> | |
<?php echo $this->Html->script('jquery-1.10.2'); ?> | |
<?php echo $this->Html->script('jquery-ui-1.10.4.custom.min'); ?> | |
<script> | |
$(function() { | |
$( "#accordion" ).accordion({ | |
collapsible: true |
This file contains hidden or 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
<?php | |
/** | |
* Components | |
* | |
* @var array | |
*/ | |
public $components = array('Paginator', 'Session'); | |
public $pagiante = array( | |
'order' => array( | |
'Job.id' => 'desc' |
NewerOlder