Created
January 25, 2011 17:26
-
-
Save airways/795258 to your computer and use it in GitHub Desktop.
Am I making Baby Jesus cry?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<table class="lokiTable workflowSteps" id="workflowSteps"><tbody> | |
<tr> | |
<th class="first">Step</th> | |
<th class="commands">Commands</th> | |
</tr> | |
<?php function step($step, $hidden, $statuses, $member_groups) { ?> | |
<tr class="step" <?php if($hidden == 'hidden') echo 'id="stepTemplate" style="display: none;"'; ?>> | |
<td> | |
<div class="itemWrapper"> | |
<div class="itemTitleLS"><label>Step 1</label></div> | |
<input type="text" id="step_name" name="step_name[]" value="<?=$step->name?>" /> | |
</div> | |
<div class="itemWrapper"> | |
<div class="itemTitleLS"><label>Owner Group</label></div> | |
<?php echo form_dropdown( | |
"step_owner_groups[]", | |
$member_groups, | |
$step->owner_group) ?> | |
</div> | |
<div class="itemWrapper"> | |
<div class="itemTitleLS"><label>Status</label></div> | |
<?php echo form_dropdown( | |
"step_status[]", | |
$statuses, | |
$step->status) ?> | |
</div> | |
<div class="itemWrapper"> | |
<div class="itemTitleLS"><label>Instructions</label></div> | |
<textarea class="stepInstructions" name="step_instructions[]"><?=$step->instructions?></textarea> | |
</div> | |
<input type="hidden" name="step_notify_start[]" class="notifyStartHidden" value="<?=$step->notify_start?>" /> | |
<input type="checkbox" class="notifyStartCheck" <?=($step->notify_start ? 'checked="checked"' : '')?> /><label>Notify assigned Members when step starts</label> | |
</td> | |
<td class="commands"><a href="#" class="deleteStepBtn">Delete</td> | |
</tr> | |
<?php } step(new Workflow_step(FALSE), 'hidden', $statuses, $member_groups); ?> | |
<tr id="noSteps" <?php if(count($steps)) echo 'style="display: none;"'; ?>> | |
<td colspan="4"><div class="highlight">No steps!</div></td> | |
</tr> | |
<?php | |
foreach($steps as $step): | |
step($step, FALSE, $statuses, $member_groups); | |
endforeach; | |
?> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment