Skip to content

Commit

Permalink
TICKET FEATURE 6708: Raising issue at step level
Browse files Browse the repository at this point in the history
  • Loading branch information
fmancardi committed Dec 7, 2015
1 parent ac26cdf commit 16a097c
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 255 deletions.
16 changes: 15 additions & 1 deletion gui/templates/execute/inc_exec_controls.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,25 @@ Author : franciscom
<tr>
<td colspan="2" class="label">{$args_labels.create_issue_feedback}</td>
</tr>

{if $gui->addIssueOp.createIssue != ''}
<tr>
<td colspan="2">
<div class="label">{$gui->addIssueOp.msg}</div>
<div class="label">{$gui->addIssueOp.createIssue.msg}</div>
</td>
</tr>
{/if}

{if $gui->addIssueOp.issueForStep != ''}
<tr>
<td colspan="2">
{foreach key=ky item=ufeed from=$gui->addIssueOp.issueForStep}
<div class="label">{$ufeed.msg}</div>
{/foreach}
</td>
</tr>
{/if}

</table>
<hr>
{/if}
Expand Down
197 changes: 12 additions & 185 deletions gui/templates/testcases/inc_steps.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{*
TestLink Open Source Project - http://testlink.sourceforge.net/
$Id: inc_steps.tpl
Purpose: Show the steps for a testcase in vertical or horizontal layout
Included from files tcView_viewer.tpl and inc_exec_test_spec.tpl
$@filesource inc_steps.tpl
Shows the steps for a testcase in vertical or horizontal layout
@used-by tcView_viewer.tpl,inc_exec_test_spec.tpl
Author : eloff, 2010
@param $layout "horizontal" or "vertical"
@param $steps Array of the steps
@param $edit_enabled Steps links to edit page if true
Expand All @@ -14,190 +13,18 @@ Author : eloff, 2010
@internal revisions
*}
{lang_get var="inc_steps_labels"
s="show_hide_reorder, step_number, step_actions,expected_results,latest_exec_notes,exec_result,clear_all_notes,
step_exec_notes,execution_type_short_descr,delete_step,insert_step,show_ghost_string"}
s="show_hide_reorder, step_number,
step_actions,expected_results,
latest_exec_notes,exec_result,
clear_all_notes,step_exec_notes,
execution_type_short_descr,delete_step,
insert_step,show_ghost_string"}

{lang_get s='warning_delete_step' var="warning_msg"}
{lang_get s='delete' var="del_msgbox_title"}

{if $layout == 'horizontal'}
<tr>
<th width="40px"><nobr>
{if $edit_enabled && $steps != '' && !is_null($steps)}
<img class="clickable" src="{$tlImages.reorder}" align="left"
title="{$inc_steps_labels.show_hide_reorder}"
onclick="showHideByClass('span','order_info');">
<img class="clickable" src="{$tlImages.ghost_item}" align="left"
title="{$inc_steps_labels.show_ghost_string}"
onclick="showHideByClass('tr','ghost');">
{/if}
{$inc_steps_labels.step_number}
</th>
<th>{$inc_steps_labels.step_actions}
</th>
<th>{$inc_steps_labels.expected_results}</th>
{if $session['testprojectOptions']->automationEnabled}
<th width="25">{$inc_steps_labels.execution_type_short_descr}</th>
{/if}
{if $edit_enabled}
<th>&nbsp;</th>
<th>&nbsp;</th>
{/if}
{if isset($add_exec_info) && $add_exec_info}
<th>{if $tlCfg->exec_cfg->steps_exec_notes_default == 'latest'}{$inc_steps_labels.latest_exec_notes}
{else}{$inc_steps_labels.step_exec_notes}{/if}
<img class="clickable" src="{$tlImages.clear_notes}"
onclick="javascript:clearTextAreaByClassName('step_note_textarea');" title="{$inc_steps_labels.clear_all_notes}"></th>
<th>{$inc_steps_labels.exec_result}</th>
{/if}


</tr>

{$rowCount=$steps|@count}
{$row=0}

{$att_ena = isset($add_exec_info) && $add_exec_info}
{$att_ena = $att_ena && $tlCfg->exec_cfg->steps_exec_attachments}

{foreach from=$steps item=step_info}
<tr id="step_row_{$step_info.step_number}">
<td style="text-align:left;">
<span class="order_info" style='display:none'>
{if $edit_enabled}
<input type="text" class="step_number{$args_testcase.id}" name="step_set[{$step_info.id}]" id="step_set_{$step_info.id}"
value="{$step_info.step_number}"
size="{#STEP_NUMBER_SIZE#}"
maxlength="{#STEP_NUMBER_MAXLEN#}">
{include file="error_icon.tpl" field="step_number"}
{/if}
</span>
{$step_info.step_number}
</td>
<td {if $edit_enabled} style="cursor:pointer;" onclick="launchEditStep({$step_info.id})" {/if}>{$step_info.actions}
</td>
<td {if $edit_enabled} style="cursor:pointer;" onclick="launchEditStep({$step_info.id})" {/if}>{$step_info.expected_results}</td>
{if $session['testprojectOptions']->automationEnabled}
<td {if $edit_enabled} style="cursor:pointer;" onclick="launchEditStep({$step_info.id})" {/if}>{$gui->execution_types[$step_info.execution_type]}</td>
{/if}

{if $edit_enabled}
<td class="clickable_icon">
<img style="border:none;cursor: pointer;"
title="{$inc_steps_labels.delete_step}"
alt="{$inc_steps_labels.delete_step}"
onclick="delete_confirmation({$step_info.id},'{$step_info.step_number|escape:'javascript'|escape}',
'{$del_msgbox_title}','{$warning_msg}');"
src="{$tlImages.delete}"/>
</td>

<td class="clickable_icon">
<img style="border:none;cursor: pointer;" title="{$inc_steps_labels.insert_step}"
alt="{$inc_steps_labels.insert_step}"
onclick="launchInsertStep({$step_info.id});" src="{$tlImages.insert_step}"/>
</td>

{/if}

{if isset($add_exec_info) && $add_exec_info}
<td class="exec_tcstep_note">
<textarea class="step_note_textarea" name="step_notes[{$step_info.id}]" id="step_notes_{$step_info.id}"
cols="40" rows="5">{$step_info.execution_notes|escape}</textarea>
</td>

<td>
<select name="step_status[{$step_info.id}]" id="step_status_{$step_info.id}">
{html_options options=$gui->execStatusValues}
</select>
</td>

{/if}

</tr>
{if $gui->allowStepAttachments && $att_ena}
<tr>
<td colspan=6>
{include file="attachments_simple.inc.tpl" attach_id=$step_info.id}
</td>
</tr>
{/if}

{if $ghost_control}
<tr class='ghost' style='display:none'><td></td><td>{$step_info.ghost_action}</td><td>{$step_info.ghost_result}</td></tr>
{/if}

{$rCount=$row+$step_info.step_number}
{if ($rCount < $rowCount) && ($rowCount>=1)}
<tr width="100%">
{if $session['testprojectOptions']->automationEnabled}
<td colspan=6>
{else}
<td colspan=5>
{/if}
<hr align="center" width="100%" color="grey" size="1">
</td>
</tr>
{/if}

{/foreach}
{include file="testcases/steps_horizontal.inc.tpl"}
{else}
{* Vertical layout *}
{if $edit_enabled}
<tr><td>
<img class="clickable" src="{$tlImages.reorder}" align="left" title="{$inc_steps_labels.show_hide_reorder}"
onclick="showHideByClass('span','order_info');"></td>
<td>{$inc_steps_labels.show_hide_reorder}</td>
</tr>
{/if}
{foreach from=$steps item=step_info}
<tr>
<th width="25px"><nobr>{$inc_steps_labels.step_number}
<span class="order_info" style='display:none'>
<input type="text" name="step_set[{$step_info.id}]" id="step_set_{$step_info.id}"
value="{$step_info.step_number}"
size="{#STEP_NUMBER_SIZE#}"
maxlength="{#STEP_NUMBER_MAXLEN#}">
{include file="error_icon.tpl" field="step_number"}
</span>{$step_info.step_number}</nobr></th>
<th>{$inc_steps_labels.step_actions}</th>
{if $session['testprojectOptions']->automationEnabled}
<th>{$inc_steps_labels.execution_type_short_descr}:
{$gui->execution_types[$step_info.execution_type]}</th>
{else}
<th>&nbsp;</th>
{/if}
{if $edit_enabled}
<th>&nbsp;</th>
{/if}
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" {if $edit_enabled} style="cursor:pointer;"
onclick="launchEditStep({$step_info.id})"{/if}
style="padding: 0.5em">{$step_info.actions}</td>
{if $edit_enabled}
<td class="clickable_icon">
<img style="border:none;cursor: pointer;"
title="{$inc_steps_labels.delete_step}"
alt="{$inc_steps_labels.delete_step}"
onclick="delete_confirmation({$step_info.id},
'{$step_info.step_number|escape:'javascript'|escape}',
'{$del_msgbox_title}','{$warning_msg}');"
src="{$tlImages.delete}"/>
<img style="border:none;cursor: pointer;" title="{$inc_steps_labels.insert_step}"
alt="{$inc_steps_labels.insert_step}"
onclick="launchInsertStep({$step_info.id});" src="{$tlImages.insert_step}"/>

</td>
{/if}
</tr>
<tr>
<th style="background: transparent; border: none"></th>
<th colspan="2">{$inc_steps_labels.expected_results}</th>
</tr>
<tr {if $edit_enabled} style="cursor:pointer;"
onclick="launchEditStep({$step_info.id})"{/if}>
<td>&nbsp;</td>
<td colspan="2" style="padding: 0.5em 0.5em 2em 0.5em">{$step_info.expected_results}</td>
</tr>
{/foreach}
{include file="testcases/steps_vertical.inc.tpl"}
{/if}
Loading

0 comments on commit 16a097c

Please sign in to comment.