1
|
|
|
<li> |
2
|
|
|
<h2><?= $data->title ?></h2> |
3
|
|
|
|
4
|
|
|
<?php if (isset($error) && $error) echo CHtml::tag('p', ['class'=>'error'], $error); ?> |
5
|
|
|
<div class="grid ui-grid-c"> |
6
|
|
|
<div class="ui-block-a"><h3>követelmény</h3> |
7
|
|
|
<p<?php if ($notify && !$data->action->reqPassed['energy']): ?> class="error"<?php endif; ?>><?= $data->req_energy ?> energia</p> |
8
|
|
|
<?php if ($data->gate): ?> |
9
|
|
|
<p<?php if ($notify && !$data->action->reqPassed['routinesFull']): ?> class="error"<?php endif; ?>>100% rutin a megbízásokban</p> |
10
|
|
|
<?php endif; ?> |
11
|
|
|
|
12
|
|
|
<?php foreach ($data->req_baits as $req): ?> |
13
|
|
|
<p><?php |
14
|
|
|
if ($req['haveEnought']) { |
15
|
|
|
echo $req['linkTitle']; |
16
|
|
|
} else { |
17
|
|
|
$properties = ['data-ajax'=>'false']; |
18
|
|
|
if ($notify) $properties['class'] = 'error'; |
19
|
|
|
echo CHtml::link($req['linkTitle'], '/shop/buyBaits', $properties); |
20
|
|
|
} |
21
|
|
|
?></p> |
22
|
|
|
<?php endforeach; ?> |
23
|
|
|
</div> |
24
|
|
|
<div class="ui-block-b"><h3>jutalom</h3> |
25
|
|
|
<p><?= $data['award_xp'] ?> tp</p> |
26
|
|
|
<p><?= $data['award_dollar'] ?></p> |
27
|
|
|
<?php if (!$data->gate_visited && $data->gate): ?> |
28
|
|
|
<p>utazás ide: <?= $data->gate_name ?></p> |
29
|
|
|
<p><?= Yii::app()->params['goldPerGateMission'] ?> arany</p> |
30
|
|
|
<?php endif; ?> |
31
|
|
|
<?php if ($data->award_setpart): ?> |
32
|
|
|
<p>szett elemet találhatsz</p> |
33
|
|
|
<?php endif; ?> |
34
|
|
|
</div> |
35
|
|
|
<div class="ui-block-c"><h3>megbízás</h3> |
36
|
|
View Code Duplication |
<?php if (!$data->gate): ?> |
|
|
|
|
37
|
|
|
<p<?php if ($data['routine']>99) echo ' class="muted"'; ?>>rutin: <?= $data['routine'] < 100 ? $data['routine'] : 100; ?>%</p> |
38
|
|
|
<?php endif; ?> |
39
|
|
|
|
40
|
|
|
<?php if ($data['chance'] < 100): ?> |
41
|
|
|
<p>esély: <?= $data['chance'] ?>%</p> |
42
|
|
|
<?php endif; ?> |
43
|
|
|
</div> |
44
|
|
|
<div class="ui-block-d"><p class="btn-cell"> |
45
|
|
|
<form action="<?= $this->createUrl('missions/list', ['id'=>$data['water_id']]); ?>" method="post"> |
46
|
|
|
<div data-role="controlgroup" data-type="horizontal" data-mini="true"> |
47
|
|
|
<input type="hidden" name="mission_id" value="<?= $data['id']; ?>"> |
48
|
|
|
|
49
|
|
|
<a href="#popupInfo<?= $data->id ?>" data-rel="popup" data-role="button" data-transition="pop" data-icon="info" data-iconshadow="false" data-theme="e" data-iconpos="notext" data-mini="true" class="ui-icon-nodisc ui-icon-alt">Teljes szöveg</a> |
50
|
|
|
<input type="submit" value="<?= $data['chance']==100 ? 'mehet' : 'próba' ?>" data-mini="true" data-inline="true"<?= $data['routine'] >= 100 ? ' disabled=""' : '' ?>> |
51
|
|
|
</div> |
52
|
|
|
</form> |
53
|
|
|
</p></div> |
54
|
|
|
</div><!-- /grid-c --> |
55
|
|
|
</li> |
56
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.