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 | |
| // Flash messages without parameters | |
| $this->container->get('flash')->show($this->container->get('translator')->trans('label.no_parameter'), FlashMessageTypes::SUCCESS); | |
| // Flash messages with parameters | |
| $this->container->get('flash')->show($this->container->get('translator')->trans('label.with_parameter', array('%id%' => $entity->id())), FlashMessageTypes::SUCCESS); | |
| // Form types without parameters | |
| $builder->add('name', 'text', array( |
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
| // Prepare files from content type field | |
| function prepare_files($node) { | |
| $files = field_get_items('node', $node, 'field_attachments'); | |
| // break up and return nothing, if there are no files | |
| if (empty($files)) { | |
| return NULL; | |
| } | |
| // iterate through the links and render the output | |
| foreach ($files as $file) { |
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
| // Textarea fields | |
| $('body').prepend('<textarea id="myTextArea"></textarea>'); | |
| $('#myTextArea').textinput(); | |
| // Text input fields | |
| $('body').prepend('<input type="text" id="myTextField" />'); | |
| $('#myTextField').textinput(); | |
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
| # | |
| # This file is only needed for Compass/Sass integration. If you are not using | |
| # Compass, you may safely ignore or delete this file. | |
| # | |
| # If you'd like to learn more about Sass and Compass, see the sass/README.txt | |
| # file for more information. | |
| # | |
| # Change this to :production when ready to deploy the CSS to the live server. | |
| environment = :development |
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
| header = _.template(tplHeader); | |
| $(this.el).prepend(header({ | |
| 'title': 'Search', | |
| 'icon': 'serach' | |
| })); |
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
| // Equal column heights | |
| var max_height = 0; | |
| $("div.col").each(function(){ | |
| if ($(this).height() > max_height) { max_height = $(this).height(); } | |
| }); | |
| $("div.col").height(max_height); |
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
| # Force trailing slashes | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{REQUEST_URI} /+[^\.]+$ | |
| RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] | |
| </IfModule> | |
| # Prevent Hotlink | |
| RewriteEngine On |
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 | |
| /** | |
| * Override or insert variables into the node templates. | |
| * | |
| * @param $variables | |
| * An array of variables to pass to the theme template. | |
| * @param $hook | |
| * The name of the template being rendered ("node" in this case.) | |
| */ |