Example #1
0
    public function makePage($_project)
    {
        $dir = getcwd();
        $siteLogs = getGitLog("{$dir}/projects/{$_project}");
        $temp = "";
        foreach ($siteLogs as $gitInfo) {
            $project = [];
            $project["name"] = $_project;
            $project["author"] = " - ";
            $project["tag"] = "1.0.0";
            $project["date"] = " - ";
            $project["message"] = " - ";
            $project["percent"] = 100;
            $project["buttons"] = false;
            if (is_array($gitInfo)) {
                $projectTemp = $gitInfo;
                $project["author"] = $projectTemp["author"];
                $project["tag"] = $projectTemp["tag"];
                $project["date"] = $projectTemp["date"];
                $project["message"] = $projectTemp["message"];
            }
            if (isset($project["tag"])) {
                $percent = explode(".", $project["tag"]);
                $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
                $project["percent"] = $percent;
            }
            $project["percentUnit"] = $project["percent"] % 100;
            $project["colorBar"] = $this->getColor($project["percent"]);
            $temp .= jBlockFile("bundles/views/homePocket.twig", ["project" => $project, "config" => ["newTab" => 'target="_blank"', "dimension" => "2"]]);
        }
        jBlock();
        ?>
				<div class="row" id="projects">
					<div class="col-lg-12">
						<div class="col-xs-12">
							<div class="well projectName">
								<?php 
        echo $_project;
        ?>
							</div>
						</div>
						<?php 
        echo $temp;
        ?>
					</div>
				</div>
			<?php 
        return jBlockEnd();
    }
Example #2
0
    public function makePage()
    {
        $sites = $this->returnSubFolder("projects");
        $dir = getcwd();
        $temp = "";
        foreach ($sites as $siteName) {
            $gitInfo = getGitLog("{$dir}/projects/{$siteName}");
            $project = [];
            $project["name"] = $siteName;
            $project["author"] = " - ";
            $project["tag"] = "1.0.0";
            $project["date"] = " - ";
            $project["message"] = " - ";
            $project["percent"] = 100;
            $project["buttons"] = true;
            if (count($gitInfo) != 0) {
                $projectTemp = array_shift($gitInfo);
                $project["author"] = $projectTemp["author"];
                $project["tag"] = $projectTemp["tag"];
                $project["date"] = $projectTemp["date"];
                $project["message"] = $projectTemp["message"];
            }
            if (isset($project["tag"])) {
                $percent = explode(".", $project["tag"]);
                $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
                $project["percent"] = $percent;
            }
            $project["percentUnit"] = $project["percent"] % 100;
            $project["colorBar"] = $this->getColor($project["percent"]);
            $temp .= jBlockFile("bundles/views/homePocket.twig", ["project" => $project, "config" => ["newTab" => 'target="_blank"', "dimension" => "2"]]);
        }
        jBlock();
        ?>
				<div class="row" id="projects">
					<div class="col-lg-12">
					<?php 
        echo $temp;
        ?>
					</div>
				</div>
			<?php 
        return jBlockEnd();
    }
Example #3
0
		<meta charset="utf-8">
		<title>Status</title>
		<link href='https://fonts.googleapis.com/css?family=Quicksand' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
	</head>
	<body>
		<div class="col-lg-12">
			<div class="row" style="margin-top:20px;">
				<div class="col-lg-12">
					<?php 
$nPerCol = 6;
$max = 12;
$dim = $max / $nPerCol;
$cont = 0;
$percent;
foreach (getGitLog() as $i) {
    $cont++;
    if ($cont % $nPerCol == 1) {
        echo '<div class="row">';
    }
    if (isset($i["tag"])) {
        $percent = explode(".", $i["tag"]);
        $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
    }
    ?>
						<div class="col-lg-<?php 
    echo $dim;
    ?>
">
							<div class="well well-sm miniblock">
								<div class="autor"><b>Autor:</b> <?php