<?php

class Sinistro2_FerramentasController extends Agro_Controller_Action {

	public function getModel(){
		return new Sinistro2_Model_Ferramentas();
	}
	
    public function indexAction() {
        $this->view->title = 'Ferramentas Sinistro';
    }

    public function emissaoetiquetasAction(){
    	$this->view->title = 'Sinistro » Ferramentas » Emissão de Etiquetas';
    	$this->view->form = new Sinistro2_Form_EmissaoEtiquetas();
    }

    public function mostraretiquetasemitidasAction(){
    	$this->getHelper('layout')->disableLayout();

    	$Model = $this->getModel();

    	$propostas = $this->getRequest()->getParam("id_proposta");

    	try {

	    	$this->view->propostas = $Model->mostrarEtiquetasEmitidas($propostas); 

    	} catch (Exception $e) {
    		$this->view->propostas = false;
    		$this->view->erro = $e->getMessage();
    	}
    }
}
