Skip to content

Commit

Permalink
Merge branch 'live' into feature/highlighted_rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeig committed Jun 9, 2023
2 parents 196d676 + 8ac2172 commit 19d48db
Show file tree
Hide file tree
Showing 37 changed files with 647 additions and 249 deletions.
15 changes: 11 additions & 4 deletions Resources/templates/responsive/channel/partials/projects_block.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@
<div class="row">
<?php foreach ($this->projects as $project): ?>
<div class="col-md-4 col-sm-6 col-xs-12 spacer widget-element">
<?= $this->insert('project/widgets/normal', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php if ($project->isPermanent()): ?>
<?= $this->insert('project/widgets/normal_permanent', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php else: ?>
<?= $this->insert('project/widgets/normal', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<div class="slider slider-projects" data-total="<?= (int)$this->total_projects ?>" data-limit="<?= (int)$this->limit ?>">
<?php foreach ($this->projects as $project) : ?>
<div class="item widget-slide">
<?= $this->insert('project/widgets/normal', [
'project' => $project
]) ?>
</div>
<div class="item widget-slide">
<?php if ($project->isPermanent()): ?>
<?= $this->insert('project/widgets/normal_permanent', ['project' => $project]) ?>
<?php else: ?>
<?= $this->insert('project/widgets/normal', ['project' => $project]) ?>
<?php endif; ?>
</div>
<?php endforeach ?>
</div>
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<?php if($this->projects): ?>
<?php foreach ($this->projects as $project) : ?>
<div class="col-sm-6 col-md-4 col-xs-12 spacer widget-element">
<?= $this->insert('project/widgets/normal', [
'project' => $project,
// 'admin' => $project->userCanEdit($this->get_user())
'admin' => (bool)$this->admin
]) ?>
<?php if ($project->isPermanent()): ?>
<?= $this->insert('project/widgets/normal_permanent', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php else: ?>
<?= $this->insert('project/widgets/normal', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php endif; ?>
</div>
<?php endforeach ?>
<?php endif ?>
8 changes: 8 additions & 0 deletions Resources/templates/responsive/dashboard/project/campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@

$(function(){

$('#autoform_type').on('change', function() {
const value = this.value;
if (value == 'permanent')
$('#form-one_round').hide();
else
$('#form-one_round').show();
})

$('#autoform_one_round input[type="radio"]').on('change', function() {
var $help = $(this).closest('.input-wrap').find('.help-text');
$active = $help.find('span').eq(1-$(this).val()).removeClass('hidden');
Expand Down
15 changes: 11 additions & 4 deletions Resources/templates/responsive/discover/partials/projects_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
<?php if ($this->projects) : ?>
<?php foreach ($this->projects as $project): ?>
<div class="col-sm-6 col-md-4 col-xs-12 spacer widget-element">
<?= $this->insert('project/widgets/normal', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php if ($project->isPermanent()): ?>
<?= $this->insert('project/widgets/normal_permanent', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php else: ?>
<?= $this->insert('project/widgets/normal', [
'project' => $project,
'admin' => (bool)$this->admin
]) ?>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php else : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@
<a href="<?= $this->link ?>/discover/archived?<?= $this->get_querystring() ?>" ><?= $this->text('discover-group-archive-header') ?></a>
</li>
<?php $this->stop() ?>
<?php $this->section('project-filters-item-7') ?>
<li class="<?= $this->filter === 'permanent' ? 'active' : ''?>" data-status="permanent">
<a href="<?= $this->link ?>/discover/permanent?<?= $this->get_querystring() ?>" ><?= $this->text('discover-group-permanent-header') ?></a>
</li>
<?php $this->stop() ?>
</ul>
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<div class="slider slider-projects" data-total="<?= (int)$this->total_projects ?>" data-limit="<?= (int)$this->limit ?>">
<?php foreach ($this->projects as $project) : ?>
<div class="item widget-slide">
<?= $this->insert('project/widgets/normal', [
'project' => $project
]) ?>
<?php if ($project->isPermanent()): ?>
<?= $this->insert('project/widgets/normal_permanent', ['project' => $project]) ?>
<?php else: ?>
<?= $this->insert('project/widgets/normal', ['project' => $project]) ?>
<?php endif; ?>
</div>
<?php endforeach ?>
</div>
3 changes: 3 additions & 0 deletions Resources/templates/responsive/home/partials/projects_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
<li data-status="recent">
<?= $this->text('discover-group-recent-header') ?>
</li>
<li data-status="permanent">
<?= $this->text('discover-group-permanent-header') ?>
</li>
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<ul class="data-list">
<li>
<h5><?= $this->text('project-obtained') ?></h5>
<p><strong><?= amount_format($this->project->amount) ?></strong></p>
</li>
<li class="divider"></li>
<li>
<h5><?= $this->project->num_investors . ' ' . $this->text('project-menu-supporters') ?></h5>
</li>
<?php
if($this->project->project_location):
// TODO: link this to some map?
?>
<li class="divider"></li>
<li>
<h6><a><i class="fa fa-map-marker"></i> <?= $this->project->project_location ?></a></h6>
</li>
<?php endif ?>
</ul>
17 changes: 8 additions & 9 deletions Resources/templates/responsive/project/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@
<div class="project-by"><a href="/user/<?= $project->owner ?>"><?= $project->user->name ?></a></div>
</div>

<div class="row">
<div class="col-sm-8">
<?= $this->insert('project/partials/media', ['project' => $project ]) ?>
</div>
<div class="col-sm-4">
<?= $this->insert('project/partials/meter', ['project' => $project ]) ?>
</div>
</div>
<div class="row">
<div class="col-sm-8">
<?= $this->insert('project/partials/media', ['project' => $project ]) ?>
</div>
<div class="col-sm-4">
<?= $this->insert('project/partials/meter', ['project' => $project ]) ?>
</div>
</div>

<!-- Tags and share info -->
<div class="row">
Expand All @@ -87,7 +87,6 @@
<!-- End container fluid -->

<div class="container-fluid section">

<?php if ($project->isImpactCalcActive()):?>
<div class="impact-calculator-details row">
<?= $this->insert('project/partials/impact_by_footprint', ['footprints' => $this->footprints ]) ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@
</div>
</div>

<?= $this->insert('project/partials/responsive_meter.php', ['project' => $project ]) ?>
<?php if ($project->type = 'campaign'): ?>
<?= $this->insert('project/partials/responsive_meter.php', ['project' => $project ]) ?>
<?php endif; ?>

<div id="project-tabs-menu" class="row spacer project-menu hidden-xs">
<a href="/project/<?= $project->id ?>" class="pronto" data-pronto-target="#project-tabs" data-pronto-scroll-to="#project-tabs-menu">
Expand Down
2 changes: 1 addition & 1 deletion Resources/templates/responsive/project/partials/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
elseif(!empty($project->secGallery['play-video'][0])):
?>
<div class="project-media video-holder" style="position:relative;height:auto;" id="video_holder">
<img class="img-responsive" src="<?php echo $project->secGallery['play-video'][0]->imageData->getLink(780, 478); ?>" />
<img class="img-responsive" src="<?php echo $project->secGallery['play-video'][0]->imageData->getLink(780, 478); ?>" />
</div>
<?php
elseif($project->image && $project->image->id):
Expand Down
Loading

0 comments on commit 19d48db

Please sign in to comment.