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
jQuery.fn.ul_to_select = function(){ | |
return this.each(function(){ | |
var select_box = document.createElement('select'); | |
select_box.id = this.id + '_select' | |
this.parentNode.insertBefore(select_box, this); | |
$('<option></option>').html('Choose...').appendTo('#'+select_box.id); | |
$(this).find('li a').each(function(link){ | |
$('<option></option>').html(this.innerHTML).attr('value', this.href).appendTo('#'+select_box.id); | |
}); | |
this.parentNode.removeChild(this); |
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
<?php | |
/* | |
Provides a BACS Payment Gateway. | |
Created by Mike Pepper ([email protected]) | |
Based on the cheque gateway created by Andrew Benbow ([email protected]) | |
*/ | |
class jigoshop_bacs extends jigoshop_payment_gateway { | |
public function __construct() { |
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
$query = craft()->elements->buildElementsQuery(); | |
$query->andWhere(DbHelper::parseDateParam("content.field_eventStart", '>='.$startDate, $query->params)); | |
$query->andWhere(DbHelper::parseDateParam("content.field_eventEnd", '<='.$endDate, $query->params)); | |
$results = $query->queryAll(); |
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
{% set excludedIds = [] %} | |
{% set allProducts = craft.entries.section('products') %} | |
{% for product in allProducts %} | |
{% if product.productCategories|length %} | |
{% set excludedIds = excludedIds|merge(['not '~product.id]) %} | |
{% endif %} | |
{% endfor %} | |
{% set products = craft.entries.section('products').id(excludedIds).limit(null) %} |
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
{# news/_entry.twig #} | |
{% block breadcrumbs %} | |
{{ macro.breadcrumbs(entry, { parent: craft.entries.id(45).first() }) }} | |
{% endblock %} |
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
{% macro datesBetween(startDate, endDate, currentDate = null) %} | |
{% import _self as self %} | |
{# initialize the currentDate from the startDate #} | |
{% if currentDate is null %} | |
{% set currentDate = startDate %} | |
{% endif %} | |
{# echo the current date, or the startDate if it's the first run #} | |
<li>{{ currentDate }}</li> |
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
{% set searchTerm = craft.request.getParam('search') %} | |
{% set entries = craft.entries.hideFromSearchResults([0]).search(searchTerm).limit(25) %} | |
{% if searchTerm and entries|length %} | |
{% paginate entries as page %} | |
{% for entry in page %} | |
{% include [ entry.section.handle~"/_excerpt-search", | |
"pages/_excerpt-search", | |
"_errors/template-missing-search" ] %} | |
{% endfor %} |
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
{%- if currentUser.admin | |
or ( | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntries:' ~ entry.section.id) ) | |
or ( | |
entry.section.type == 'Single' and | |
( entry.authorId == currentUser.id and currentUser.can('editEntries:' ~ entry.section.id) ) | |
or ( entry.authorId != currentUser.id and currentUser.can('editPeerEntryDrafts:' ~ entry.section.id) ) | |
) | |
) |
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
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
OlderNewer