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
<a id='like_12' href='#' onclick='function(this)'>curti!</a> | |
<a id='like' data-speaker-id='12' href='#'>curti!</a> | |
$('#like').live('click', function(event){ | |
speaker_id = $(this).attr('data-speaker_id'); | |
sendRequest('/like',{speaker:speaker_id}, | |
'#vote_'+speaker_id); | |
return false; | |
}); |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
class Layout | |
{ | |
public $base_url; | |
public function initx(){ | |
return 'ok!'; | |
} | |
/** | |
* Metodo que executa as implementacoes. |
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 | |
class MY_Controller extends CI_Controller | |
{ | |
# public $layout = 'default'; | |
public $title = 'Unesc - Universidade do Extremo Sul Catarinense'; | |
public $css = array('application','libs/blueprint/screen'); | |
public $js = array('application','libs/jquery-1.6.2.min','libs/modernizr-2.0.6'); | |
public $data = array(); | |
public $view = TRUE; |
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
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="utf-8"> | |
<title>{title_for_layout}</title> | |
{css_for_layout} | |
{js_for_layout} | |
<!--[if lt IE 8]><link rel="stylesheet" href="assets/css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> | |
</head> | |
<body> |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
function render_partial($partial, $locals = null, $collection = null, $ajax = NULL) { | |
$partial = APPPATH .'views/'. $partial; | |
$contents = ''; | |
foreach($locals AS $key => $value) { | |
${$key} = $value; |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class People extends MY_Controller { | |
function __construct() { | |
parent::__construct(); | |
} | |
function index() | |
{ |
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
## conteúdo da view index.php | |
<h2>application::views::welcome::show</h2> | |
<h1>Rendering a partials with locals</h1> | |
<!-- inclui uma partial sem loop, apenas passando variaveis locais --> | |
<?= render_partial('people/_list_people.php', $locals_vars ); ?> | |
<h1>Rendering a collection of partials</h1> | |
<!-- passando uma collection o conteúdo da partial é inserida a cada linha do loop --> | |
<?= render_partial('people/_people.php', |
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
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
set :rvm_ruby_string, '1.9.2@rails3' # Or whatever env you want it to run in. | |
set :rvm_type, :user | |
# bundler bootstrap | |
require 'bundler/capistrano' | |
#ssh_options[:auth_methods] = %w(password keyboard-interactive) | |
#default_run_options[:pty] = true |
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
CREATE TABLE `academico_test`.`phone_carrier` ( | |
`id` INT NOT NULL AUTO_INCREMENT, | |
`name` VARCHAR(150) , | |
`txt_address` VARCHAR(150) , | |
`txt_message_length` VARCHAR(150) , | |
PRIMARY KEY (`id`) | |
) | |
ENGINE = MyISAM; |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
#$active_group = 'default'; | |
$enviroment = 'default'; | |
if (ENVIRONMENT === 'testing') $enviroment .= '_test'; | |
$active_group = $enviroment; | |
$active_record = TRUE; | |
// production enviromment |
OlderNewer