$softwareAndRelationshipUsersOf = $response->body('json_decode');
$RelationshipsUsersOf = $softwareAndRelationshipUsersOf->RelationshipsUsersOf;
+ $relationshipsServiceProviders = $softwareAndRelationshipUsersOf->relationshipsServicePorviders;
$software = $softwareAndRelationshipUsersOf->software;
} catch (Exception $exception) {
$this->log(var_export($exception, true), "debug");
$this->set('project',$software);
$this->set('usersOf', $RelationshipsUsersOf);
+ $this->set('relationshipsServicePorviders',$relationshipsServiceProviders);
}
public function request(array $data) {
?>
-<?php if (isset($reviews) ) : ?>
- <section id="software-reviews">
- <h2><?= __("Reviews for ")?> <?= __("[ProjectName]")?></h2>
- <?php foreach ($reviews as $review): ?>
- <article>
- <header>
- <ol class="">
- <li>
- <strong> <?= $review->title ?> </strong>
- </li>
- <li>
- <?= $review->author ?>
- </li>
- <li class="text-muted">
- <?= $review->date ?>
- </li>
- <li>
- <?= $review->rating ?>
- </li>
- </ol>
- </header>
- <p class="comment">
- <?= $review->comment ?>
- </p>
- </article>
- <?php endforeach; ?>
- <nav>
-
- </nav>
- </section>
-
-<?php endif; ?>
-
-
-<?php if (!isset($reviews) ) : ?>
- <section id="section-reviews row">
- <h2><?= __("Reviews for ")?> <?= __("[ProjectName]")?></h2>
- <div class="col-md-5">
-
- <ol class=" list-unstyled">
- <li>
- <h3> Titi content </h3>
- </li>
- <li>
- Mr. TITI
- </li>
- <li>
- Today ?
- </li>
- <li>
- <div class="ratingStar">
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- </div>
- </li>
- </ol>
-
- <p class="comment">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- </p>
- </div>
- <div class="col-md-5">
-
- <ol class=" list-unstyled">
- <li>
- <h3> Super soft </h3>
- </li>
- <li>
- Mr. TOTO
- </li>
- <li>
- Today ?
- </li>
- <li>
- <div class="ratingStar">
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- </div>
- </li>
- </ol>
-
- <p class="comment">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- </p>
-
- </div>
-
-
-
- </section>
-
-<?php endif; ?>
<?php if (!empty( $project->reviews ) ): ?>
-<section class="row">
- <div class="col-md-5">
-
- <ol class=" list-unstyled">
- <?php foreach ($project->reviews as $review) : ?>
- <h3> <?php echo $review->title ;?> </h3>
-
+<section class="row">
+ <?php foreach ($project->reviews as $review) : ?>
+ <div class="col-md-5">
+ <ol class=" list-unstyled list-inline">
+ <li>
+ <h3> <?php echo $review->title ;?> </h3>
+ </li>
+ <li>
+ <?php echo $review->created ;?>
+ </li>
+ <li>
+ <?php echo $this->cell('UserSummary',[$review->user_id])->render('../../Element/Entity/entityName')?>
+ </li>
+ <li>
+ <div class="ratingStar">
+ <?php for ($i=0 ; $i<$review->evaluation ; $i++) : ?>
+ <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
+ <?php $i++; ?>
+ <?php endfor; ?>
+ </div>
+ </li>
+ </ol>
<p>
- <h3> <?php echo $review->comment ;?> </h3>
+ <?php echo $review->comment ;?>
</p>
- <?php endforeach; ?>
-
- <li>
- Mr. TITI
- </li>
- <li>
- Today ?
- </li>
- <li>
- <div class="ratingStar">
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- <span class="glyphicon glyphicon-star" aria-hidden="true"></span>
- </div>
- </li>
- </ol>
-
- <p class="comment">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- </p>
- </div>
+ </div>
+ <?php endforeach; ?>
</section>
<?php endif; ?>
\ No newline at end of file
*/
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(MANIVELLE_URL."users/view/".$id,[],['type'=>'json']);
}catch (Exception $exception){
$this->log(var_export($exception,true),"debug");
}
- $this->set('user',$user->user);
+ return $user;
}
}