public function showAction() { $ent = $this->getCurrentDev(); if (!$ent) { $this->statusCode = Makiavelo::RESPONSE_CODE_NOT_FOUND; $this->flash->setError("Wrong name dude, the developer you're looking for does not exist."); $this->redirect_to(home_root_path_path()); } else { $this->render(array("entity" => $ent)); } }
public function createAction() { $entity = new WebSiteMessage(); $entity->load_from_array($this->request->getParam("web_site_message")); if (save_web_site_message($entity)) { $this->flash->setSuccess("Message sent! Thanks for getting in touch!"); $this->redirect_to(home_root_path_path()); } else { $this->flash->setError("Both fields are required, make sure you fill them! And the email must be valid one."); $this->redirect_to(home_root_path_path()); } }
public function createAction() { $entity = new Suscriptor(); $entity->load_from_array($this->request->getParam("suscriptor")); $same_email = load_suscriptor_where("email = '" . $entity->email . "'"); if ($same_email != null) { $this->flash->error("Dude! Chill, you're already suscribed, just relax and browse the list of repos..."); } else { if (save_suscriptor($entity)) { $this->flash->setSuccess("Thanks for suscribing! Stay tuned!"); } else { $this->flash->setError("Please enter a valid email address and try again"); } } $this->redirect_to(home_root_path_path()); }
<div class="row"> <div class="page-header"> <h1> Stats for project: <small><?php echo $this->project->name; ?> </small> <?php echo link_to(project_list_path(), "<< Back to list", array("class" => "btn btn-large pull-right")); ?> </h1> </div> <ul class="breadcrumb"> <li><a href="<?php echo home_root_path_path(); ?> ">Home</a> <span class="divider">/</span></li> <li ><a href="<?php echo project_list_path(); ?> ">List of projects</a> <span class="divider">/</span></li> <li class="active">Stats for project</li> </ul> <h2 class="pull-left">Current data</h2> <h3 class="pull-right" > by <?php echo link_to(developer_show_path($this->project->owner()), $this->project->owner()->name, array("class" => "dev-link", "data-title" => "See all projects by this user")); ?> <?php
public function signOutAction() { logout_user(); $this->redirect_to(home_root_path_path()); }