Skip to content

Commit 5247889

Browse files
committed
Merge branch 'live' into feature/highlighted_rewards
2 parents 196d676 + 8ac2172 commit 5247889

37 files changed

Lines changed: 670 additions & 260 deletions

Resources/templates/responsive/channel/partials/projects_block.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22
<div class="row">
33
<?php foreach ($this->projects as $project): ?>
44
<div class="col-md-4 col-sm-6 col-xs-12 spacer widget-element">
5-
<?= $this->insert('project/widgets/normal', [
6-
'project' => $project,
7-
'admin' => (bool)$this->admin
8-
]) ?>
5+
<?php if ($project->isPermanent()): ?>
6+
<?= $this->insert('project/widgets/normal_permanent', [
7+
'project' => $project,
8+
'admin' => (bool)$this->admin
9+
]) ?>
10+
<?php else: ?>
11+
<?= $this->insert('project/widgets/normal', [
12+
'project' => $project,
13+
'admin' => (bool)$this->admin
14+
]) ?>
15+
<?php endif; ?>
916
</div>
1017
<?php endforeach; ?>
1118
</div>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<div class="slider slider-projects" data-total="<?= (int)$this->total_projects ?>" data-limit="<?= (int)$this->limit ?>">
22
<?php foreach ($this->projects as $project) : ?>
3-
<div class="item widget-slide">
4-
<?= $this->insert('project/widgets/normal', [
5-
'project' => $project
6-
]) ?>
7-
</div>
3+
<div class="item widget-slide">
4+
<?php if ($project->isPermanent()): ?>
5+
<?= $this->insert('project/widgets/normal_permanent', ['project' => $project]) ?>
6+
<?php else: ?>
7+
<?= $this->insert('project/widgets/normal', ['project' => $project]) ?>
8+
<?php endif; ?>
9+
</div>
810
<?php endforeach ?>
911
</div>
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<?php if($this->projects): ?>
22
<?php foreach ($this->projects as $project) : ?>
33
<div class="col-sm-6 col-md-4 col-xs-12 spacer widget-element">
4-
<?= $this->insert('project/widgets/normal', [
5-
'project' => $project,
6-
// 'admin' => $project->userCanEdit($this->get_user())
7-
'admin' => (bool)$this->admin
8-
]) ?>
4+
<?php if ($project->isPermanent()): ?>
5+
<?= $this->insert('project/widgets/normal_permanent', [
6+
'project' => $project,
7+
'admin' => (bool)$this->admin
8+
]) ?>
9+
<?php else: ?>
10+
<?= $this->insert('project/widgets/normal', [
11+
'project' => $project,
12+
'admin' => (bool)$this->admin
13+
]) ?>
14+
<?php endif; ?>
915
</div>
1016
<?php endforeach ?>
1117
<?php endif ?>

Resources/templates/responsive/dashboard/project/campaign.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626

2727
$(function(){
2828

29+
$('#autoform_type').on('change', function() {
30+
const value = this.value;
31+
if (value == 'permanent')
32+
$('#form-one_round').hide();
33+
else
34+
$('#form-one_round').show();
35+
})
36+
2937
$('#autoform_one_round input[type="radio"]').on('change', function() {
3038
var $help = $(this).closest('.input-wrap').find('.help-text');
3139
$active = $help.find('span').eq(1-$(this).val()).removeClass('hidden');

Resources/templates/responsive/discover/partials/projects_list.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
<?php if ($this->projects) : ?>
55
<?php foreach ($this->projects as $project): ?>
66
<div class="col-sm-6 col-md-4 col-xs-12 spacer widget-element">
7-
<?= $this->insert('project/widgets/normal', [
8-
'project' => $project,
9-
'admin' => (bool)$this->admin
10-
]) ?>
7+
<?php if ($project->isPermanent()): ?>
8+
<?= $this->insert('project/widgets/normal_permanent', [
9+
'project' => $project,
10+
'admin' => (bool)$this->admin
11+
]) ?>
12+
<?php else: ?>
13+
<?= $this->insert('project/widgets/normal', [
14+
'project' => $project,
15+
'admin' => (bool)$this->admin
16+
]) ?>
17+
<?php endif; ?>
1118
</div>
1219
<?php endforeach; ?>
1320
<?php else : ?>

Resources/templates/responsive/discover/partials/projects_nav.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,9 @@
3434
<a href="<?= $this->link ?>/discover/archived?<?= $this->get_querystring() ?>" ><?= $this->text('discover-group-archive-header') ?></a>
3535
</li>
3636
<?php $this->stop() ?>
37+
<?php $this->section('project-filters-item-7') ?>
38+
<li class="<?= $this->filter === 'permanent' ? 'active' : ''?>" data-status="permanent">
39+
<a href="<?= $this->link ?>/discover/permanent?<?= $this->get_querystring() ?>" ><?= $this->text('discover-group-permanent-header') ?></a>
40+
</li>
41+
<?php $this->stop() ?>
3742
</ul>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<div class="slider slider-projects" data-total="<?= (int)$this->total_projects ?>" data-limit="<?= (int)$this->limit ?>">
22
<?php foreach ($this->projects as $project) : ?>
33
<div class="item widget-slide">
4-
<?= $this->insert('project/widgets/normal', [
5-
'project' => $project
6-
]) ?>
4+
<?php if ($project->isPermanent()): ?>
5+
<?= $this->insert('project/widgets/normal_permanent', ['project' => $project]) ?>
6+
<?php else: ?>
7+
<?= $this->insert('project/widgets/normal', ['project' => $project]) ?>
8+
<?php endif; ?>
79
</div>
810
<?php endforeach ?>
911
</div>

Resources/templates/responsive/home/partials/projects_nav.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
<li data-status="recent">
1212
<?= $this->text('discover-group-recent-header') ?>
1313
</li>
14+
<li data-status="permanent">
15+
<?= $this->text('discover-group-permanent-header') ?>
16+
</li>
1417
</ul>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<ul class="data-list">
2+
<li>
3+
<h5><?= $this->text('project-obtained') ?></h5>
4+
<p><strong><?= amount_format($this->project->amount) ?></strong></p>
5+
</li>
6+
<li class="divider"></li>
7+
<li>
8+
<h5><?= $this->project->num_investors . ' ' . $this->text('project-menu-supporters') ?></h5>
9+
</li>
10+
<?php
11+
if($this->project->project_location):
12+
// TODO: link this to some map?
13+
?>
14+
<li class="divider"></li>
15+
<li>
16+
<h6><a><i class="fa fa-map-marker"></i> <?= $this->project->project_location ?></a></h6>
17+
</li>
18+
<?php endif ?>
19+
</ul>

Resources/templates/responsive/project/layout.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
<div class="project-by"><a href="/user/<?= $project->owner ?>"><?= $project->user->name ?></a></div>
7070
</div>
7171

72-
<div class="row">
73-
<div class="col-sm-8">
74-
<?= $this->insert('project/partials/media', ['project' => $project ]) ?>
75-
</div>
76-
<div class="col-sm-4">
77-
<?= $this->insert('project/partials/meter', ['project' => $project ]) ?>
78-
</div>
79-
</div>
72+
<div class="row">
73+
<div class="col-sm-8">
74+
<?= $this->insert('project/partials/media', ['project' => $project ]) ?>
75+
</div>
76+
<div class="col-sm-4">
77+
<?= $this->insert('project/partials/meter', ['project' => $project ]) ?>
78+
</div>
79+
</div>
8080

8181
<!-- Tags and share info -->
8282
<div class="row">
@@ -87,7 +87,6 @@
8787
<!-- End container fluid -->
8888

8989
<div class="container-fluid section">
90-
9190
<?php if ($project->isImpactCalcActive()):?>
9291
<div class="impact-calculator-details row">
9392
<?= $this->insert('project/partials/impact_by_footprint', ['footprints' => $this->footprints ]) ?>

0 commit comments

Comments
 (0)