Skip to content

Instantly share code, notes, and snippets.

View jonathanselander's full-sized avatar
🦁
:)

Jonathan Selander jonathanselander

🦁
:)
View GitHub Profile
@jonathanselander
jonathanselander / gist:3097364
Created July 12, 2012 10:47
app/views/login/index.scala.html
@(loginForm: Form[User])
Test test
package controllers;
import play.*;
import play.mvc.*;
import play.data.*;
import views.html.login.*;
import models.*;
public class Authentication extends Controller {
<?xml version="1.0"?>
<!--
/**
* @package Made_Cache
* @author [email protected]
* @copyright Copyright (c) 2012 Made People AB. (http://www.madepeople.se/)
*/
-->
<layout version="0.1.0">
<default>
Mage_Core_Model_Resource_Store_Collection: 1
Mage_Core_Model_Resource_Website_Collection: 1
Mage_Core_Model_Resource_Store_Group_Collection: 1
Mage_Catalog_Model_Resource_Product_Attribute_Collection: 0
Mage_Catalog_Model_Resource_Product_Option_Collection: 0
Mage_Catalog_Model_Resource_Product_Link_Product_Collection: 0
Mage_Reports_Model_Resource_Product_Index_Viewed_Collection: 0
Mage_Poll_Model_Resource_Poll_Answer_Collection: 0
<?php
$mainTable = new Zend_Db_Expr('(' . $collection->getSelect() . ')');
$collection->getSelect()
->reset()
->from($mainTable);
$this->setCollection($collection);
return parent::_prepareCollection();
<?php
class Trollweb_Kreditor_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
die('yeah!');
}
}
/**
* Simple sql format date
*
* @param string $format
* @return string
*/
function now($dayOnly=false)
{
return date($dayOnly ? 'Y-m-d' : 'Y-m-d H:i:s');
}