Example #1
0
 /**
  * @param $id
  * @return object
  */
 public static function loadProjectById($id)
 {
     $project = ORM::for_table(self::$table)->select('*')->where('pro_id', $id)->find_one();
     $project->days_left = DateHelper::getHoursLeft($project->pro_date_end);
     return $project;
 }
Example #2
0
                </div>
                <div class="col-xs-2 text-center">
                    <?php 
    echo DateHelper::getShortDate($rs_proN->pro_date);
    ?>
                    <br/>
                    <?php 
    echo $rs_proN->pro_city;
    ?>
, <?php 
    echo utf8_encode($rs_proN->pro_country_name);
    ?>
                </div>
                <div class="col-xs-1 text-center">
                    <?php 
    echo DateHelper::getHoursLeft($rs_proN->pro_date_end);
    ?>
                </div>
                <div class="col-xs-1">

                    <?php 
    if (!isset($offers[$rs_proN->pro_id])) {
        ?>
                        <a class="btn btn-primary" href="<?php 
        echo UrlHelper::getProjectUrl($rs_proN->pro_id);
        ?>
">Oferta ya</a>
                    <?php 
    } else {
        ?>
                        <!-- TODO kill font18, fontW400, txtNaranja -->
Example #3
0
        default:
            //activos
            $status[] = Project::PROJECT_STATUS_ACTIVE;
            break;
    }
    if (empty($filter)) {
        $filter = 'activos';
        $status[] = Project::PROJECT_STATUS_ACTIVE;
    }
    $projects = Project_View::loadUserProjects($current_user->id, $status);
    $total_active = intval($totals[Project::PROJECT_STATUS_ACTIVE]);
    $total_draft = intval($totals[Project::PROJECT_STATUS_DRAFT]);
    $total_adjudicated = intval($totals[Project::PROJECT_STATUS_ADJUDICATED] + $totals[Project::PROJECT_STATUS_CLOSED_PHOTOGRAPHER]);
    $total_finished = intval($totals[Project::PROJECT_STATUS_CLOSED_CLIENT] + $totals[Project::PROJECT_STATUS_CLOSED_FOTOTEA] + $totals[Project::PROJECT_STATUS_CANCELLED]);
    foreach ($projects as $project) {
        $project->days_left = DateHelper::getHoursLeft($project->pro_date_end);
        if ($project->pro_status == Project::PROJECT_STATUS_DRAFT) {
            $project->advice = "Publica este proyecto ahora para recibir ofertas";
        }
        if ($project->pro_status == Project::PROJECT_STATUS_ACTIVE) {
            if ($project->total_ofertas > 0) {
                $project->advice = "No has adjudicado el proyecto, ¡hazlo ya!";
            }
        }
    }
    ?>

    <div class="containerPerfil">
        <div class="list-container">
            <div class="list-header">
                <!-- Activos -->