+++ /dev/null
-<?php
-
-/**
- * Template for the evaluation form for evaluate a software
- */
-?>
-
-<?= $this->Form->create(null,['url' => ['controller' => 'Evaluation', 'action' => 'index']]) ?>
- <?= $this->Form->input('title',['label' =>__("Title"),'placeholder'=>__("title (ex : Happy to use this software")])?>
-
- <?= $this->Form->input('comment',['type'=>'textarea','label'=>__("Comment"),'placeholder'=>'Please comment your vote.' ])?>
-
-
- <div class="rating">
- <input name="stars" id="e5" type="radio"><label for="e5"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span></label>
- <input name="stars" id="e4" type="radio"><label for="e4"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span></label>
- <input name="stars" id="e3" type="radio"><label for="e3"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span></label>
- <input name="stars" id="e2" type="radio"><label for="e2"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span></label>
- <input name="stars" id="e1" type="radio"><label for="e1"> <span class="glyphicon glyphicon-star" aria-hidden="true"></span></label>
- </div>
-
- <?php //Datas for insert in the database ?>
- <?= $this->Form->input('idSoftware',['type'=>'hidden','value'=>'1']) ?>
- <?= $this->Form->input('idEntity',['type'=>'hidden','value'=>'1']) ?>
-
- <?= $this->Form->button(__('Search'),['class'=>'submit-form'])?>
-
-<?= $this->Form->end()?>
\ No newline at end of file
+++ /dev/null
-<?php
-
-/**
- * Form for the evaluation
- */
-
-
-$this->layout = 'evaluation';
-
-?>
-
+++ /dev/null
-<?php
-
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-?>
-
-
-<!DOCTYPE html>
-<html lang="en">
- <?= $this->element("Pages/header") ?>
- <body>
-
- <?= $this->element("Navigation/navbarFixedTop") ?>
- <div class="container-fluid" id="page-wrapper">
- <div class="row">
- <div class="col-xs-11 col-xs-offset-1 col-sm-11 col-md-11 col-md-offset-1 col-lg-11 main">
-
- <div class="row">
- <?= $this->element("Entity/overview", ['user' => $user])?>
- </div>
-
- <div class="row">
- <?= $this->element("Entity/creatorOf")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare {0} as a creator of a software",$user->username),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("Entity/contributorTo" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare {0} as a contributor of a software",$user->username),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("Entity/backerFor")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare {0} as a backer of a software",$user->username),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("Entity/providerFor")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare {0} as a provider of a software",$user->username),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("Entity/user")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare {0} as a user of a software",$user->username),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
- <!-- End row -->
- </div>
- <!-- End container -->
- </div>
- <div class="row">
- <?= $this->element("Pages/footer")?>
- </div>
- </body>
-</html>
+++ /dev/null
-<?php
-
-/**
- * Layout for the evaluation page
- * Represent the structure to evaluate a software
- */
-?>
-
-
-<!DOCTYPE html>
-<html lang="en">
- <?= $this->element("Pages/header") ?>
- <body>
- <?= $this->element("Navigation/navbarFixedTop") ?>
-
- <div class="container-fluid">
-
- <div class="row">
- <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-1 main">
- <?php // Structure for evaluate a project?>
- <?php if (!isset($date['isVoted']) || !$date['isVoted'] ) : ?>
- <div class="row">
- <?= $this->element("ProjectPage/softwareSummary") ?>
- </div>
- <div class="row">
- <?= $this->element("rating") ?>
- </div>
- <?php endif; ?>
- </div>
-
- </div>
- </div>
- </body>
-</html>
+++ /dev/null
-<?php
-
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-?>
-
-
-<!DOCTYPE html>
-<html lang="en">
- <?= $this->element("Pages/header") ?>
- <body>
-
- <?= $this->element("Navigation/navbarFixedTop") ?>
-
- <div class="container-fluid">
- <div class="row">
-
- <div class="col-xs-11 col-xs-offset-1 col-sm-11 col-md-11 col-md-offset-1 col-lg-11 main">
- <div class="row">
- <?= $this->element("ProjectPage/overview",['project' => $project]) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/screenShotsList")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Add a screenshot of {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/reviews")?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Add a review of {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/serviceProviders" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare yourself as a service provider of {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/backers" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare yourself as a backer of {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/usersOfProject" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Declare yourself as a user of {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/alternativeTo" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Add an alternative to {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/worksWellWith" )?>
- </div>
- <div class="row">
- <?= $this->Html->link( __d("Layout","Add a software working well with {0}",$project->softwarename),
- ['controller' => 'Home', 'action' => 'participate'],
- ['escape' => false] ) ?>
- </div>
-
- <div class="row">
- <?= $this->element("ProjectPage/metrics" , ['project' => $project])?>
- </div>
- </div>
- </div>
- </div>
-
- <?= $this->element("Pages/footer")?>
-
- </body>
-</html>
+++ /dev/null
-<?php
-
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-?>
-<!DOCTYPE html>
-<html lang="en">
- <?= $this->element("Pages/header") ?>
- <body>
-
- <?= $this->element("Navigation/navbarFixedTop") ?>
-
- <div class="container-fluid">
- <div class="row">
- <div class="main">
- <div id="myCarousel" class="carousel slide" data-ride="carousel">
- <!-- Indicators -->
- <ol class="carousel-indicators">
- <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
- <li data-target="#myCarousel" data-slide-to="1"></li>
- <li data-target="#myCarousel" data-slide-to="2"></li>
- </ol>
- <div class="carousel-inner" role="listbox">
- <?= $this->fetch('requestTopResults') ?>
- <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
- <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
- <span class="sr-only">Previous</span>
- </a>
- <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
- <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
- <span class="sr-only">Next</span>
- </a>
- </div><!-- /.carousel -->
-
- <h2 class="sub-header"><?= __d("Layout","Results")?></h2>
-
- <div class="table-responsive">
- <?= $this->fetch('requestResults') ?>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </body>
-</html>
+++ /dev/null
-<?php
-namespace App\View\Cell;
-use Cake\Network\Http\Client;
-
-use Cake\View\Cell;
-
-/**
- * SoftwareSummary cell
- */
-class SoftwareSummaryCell extends Cell
-{
-
- /**
- * List of valid options that can be passed into this
- * cell's constructor.
- *
- * @var array
- */
- protected $_validCellOptions = [];
-
- /**
- * Default display method.
- *
- * @return void
- */
- public function display($id=null)
- {
- try {
- $http = new Client();
- $response = $http->get(COMPTOIR_SRV_API."request/".$id,[],['type'=>'json']);
- $softwareAndRelationships = $response->body('json_decode');
- $RelationshipsUsersOf = $softwareAndRelationships->RelationshipsUsersOf;
- $software = $softwareAndRelationships->software;
- //$softwareStatisitics = $softwareAndRelationships->softwares_statistics;
- }catch (Exception $exception){
- $this->log(var_export($exception,true),"debug");
- }
- $this->set('project',$software);
- $this->set('usersOf', $RelationshipsUsersOf);
- //$this->set('statistics',$softwareStatisitics);
- }
-}
+++ /dev/null
-<?php
-namespace App\View\Cell;
-
-use Cake\View\Cell;
-use Cake\Network\Http\Client;
-
-/**
- * UserSummary cell
- */
-class UserSummaryCell extends Cell
-{
-
- /**
- * List of valid options that can be passed into this
- * cell's constructor.
- *
- * @var array
- */
- protected $_validCellOptions = [];
-
- /**
- * Default display method.
- *
- * @return void
- */
- public function display($id)
- {
- $user = $this->getUserById($id);
- $this->set('user',$user->user);
- }
-
- public function getName($id){
-
-
- $user = $this->getUserById($id);
- $this->set('userName',$user->username);
- }
-
- public function getUserById($id){
- try {
- $http = new Client();
- $response = $http->get(COMPTOIR_SRV_API."users/view/".$id,[],['type'=>'json']);
- $user = $response->body('json_decode');
- }catch (Exception $exception){
- $this->log(var_export($exception,true),"debug");
- }
- return $user;
- }
-}