<?php
/* Smarty version 3.1.33, created on 2022-02-15 21:25:05
  from '/home/recursosspa/public_html/testlink/gui/templates/plan/planUpdateTC.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_620c1a31c37db8_62878208',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '2c1cef6e8e717ad996a7ddd57c23c8198dc78e69' => 
    array (
      0 => '/home/recursosspa/public_html/testlink/gui/templates/plan/planUpdateTC.tpl',
      1 => 1643038957,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:inc_del_onclick.tpl' => 1,
    'file:inc_jsCheckboxes.tpl' => 1,
    'file:inc_update.tpl' => 1,
    'file:inc_refreshTreeWithFilters.tpl' => 1,
  ),
),false)) {
function content_620c1a31c37db8_62878208 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/recursosspa/public_html/testlink/vendor/smarty/smarty/libs/plugins/function.html_options.php','function'=>'smarty_function_html_options',),));
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('var'=>'labels','s'=>'no_testcase_available,test_plan,update_testcase_versions,
             update_all_testcase_versions,th_test_case,
             warning,no_testcase_checked,
             version,linked_version,newest_version,
             note_keyword_filter,check_uncheck_all,
             check_uncheck_all_checkboxes,th_id,has_been_executed,show_tcase_spec,
             update_to_version,inactive_testcase,btn_update_testplan_tcversions,
             compare,design,execution_history'),$_smarty_tpl ) );?>


<?php $_smarty_tpl->_subTemplateRender("file:inc_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('openHead'=>"yes"), 0, false);
$_smarty_tpl->_subTemplateRender("file:inc_del_onclick.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
$_smarty_tpl->_subTemplateRender("file:inc_jsCheckboxes.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>


<?php echo '<script'; ?>
 type="text/javascript">

var alert_box_title = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['warning'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";
var warning_no_testcase_checked = "<?php echo strtr($_smarty_tpl->tpl_vars['labels']->value['no_testcase_checked'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
";

function validateForm(f)
{
  if( checkbox_count_checked(f.id) == 0)
  {
      alert_message(alert_box_title,warning_no_testcase_checked);
      return false;
  } 
 
  return true;
}
<?php echo '</script'; ?>
>


</head>

<?php $_smarty_tpl->_assignInScope('update_cb', "achecked_tc");?> <?php $_smarty_tpl->_assignInScope('item_number', 0);?>

<body class="testlink">
<h1 class="title"><?php echo $_smarty_tpl->tpl_vars['labels']->value['test_plan'];
echo @constant('TITLE_SEP');
echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->testPlanName, ENT_QUOTES, 'UTF-8', true);?>
</h1>

<?php if ($_smarty_tpl->tpl_vars['gui']->value->hasItems) {?>
  <form name="updateTcForm" id="updateTcForm" method="post"
        onSubmit="javascript:return validateForm(this);">
     <h1 class="title"><?php echo $_smarty_tpl->tpl_vars['gui']->value->action_descr;?>
</h1>
     <?php $_smarty_tpl->_subTemplateRender("file:inc_update.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('result'=>$_smarty_tpl->tpl_vars['sqlResult']->value), 0, false);
?>

    <div class="workBack">
    <?php if ($_smarty_tpl->tpl_vars['gui']->value->instructions != '') {?>
      <?php echo $_smarty_tpl->tpl_vars['gui']->value->instructions;?>

      <?php if ($_smarty_tpl->tpl_vars['gui']->value->user_feedback != '') {?>
         <br><?php echo $_smarty_tpl->tpl_vars['gui']->value->user_feedback;?>

      <?php }?>     
    <?php }?>     


  <?php if ($_smarty_tpl->tpl_vars['gui']->value->operationType == 'standard') {?>
    <input type="hidden" name="update_all_value"  id="update_all_value"  value="0" />

  	<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->items, 'ts');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['ts']->value) {
?>
  	  <?php $_smarty_tpl->_assignInScope('item_number', $_smarty_tpl->tpl_vars['item_number']->value+1);?>
  	  <?php $_smarty_tpl->_assignInScope('ts_id', $_smarty_tpl->tpl_vars['ts']->value['testsuite']['id']);?>
  	  <?php $_smarty_tpl->_assignInScope('div_id', "div_".((string)$_smarty_tpl->tpl_vars['ts_id']->value));?>
  	
  	  <div id="<?php echo $_smarty_tpl->tpl_vars['div_id']->value;?>
"  style="margin:0px 0px 0px <?php echo $_smarty_tpl->tpl_vars['ts']->value['level'];?>
0px;">
  	    <h3 class="testlink">
        <?php if ($_smarty_tpl->tpl_vars['item_number']->value == 1) {?>
  	    <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['toggle_all'];?>
" border="0" alt="<?php echo $_smarty_tpl->tpl_vars['labels']->value['check_uncheck_all'];?>
" 
                   title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['check_uncheck_all'];?>
" 
                   onclick="cs_all_checkbox_in_div('updateTcForm','<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;?>
','update_all_value');" />
        <?php }?>
        <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ts']->value['testsuite']['name'], ENT_QUOTES, 'UTF-8', true);?>
 
  	    </h3> 
     
              <input type="hidden" name="update_value_<?php echo $_smarty_tpl->tpl_vars['ts_id']->value;?>
"  id="update_value_<?php echo $_smarty_tpl->tpl_vars['ts_id']->value;?>
"  value="0" />
              
             
       <?php if ($_smarty_tpl->tpl_vars['ts']->value['testcase_qty'] > 0 || $_smarty_tpl->tpl_vars['ts']->value['linked_testcase_qty'] > 0) {?>
          <table border="0" cellspacing="0" cellpadding="2" style="font-size:small;" width="100%">
            <tr style="background-color:blue;font-weight:bold;color:white">
  			     <th class="clickable_icon">
  			         <img src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['toggle_all'];?>
" title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['check_uncheck_all_checkboxes'];?>
"
  			              onclick='cs_all_checkbox_in_div("<?php echo $_smarty_tpl->tpl_vars['div_id']->value;?>
","<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;?>
","update_value_<?php echo $_smarty_tpl->tpl_vars['ts_id']->value;?>
");' />
  			     </th>
  			     <th style="width:45%"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_test_case'];?>
</th>
  			     <th class="clickable_icon"><?php echo $_smarty_tpl->tpl_vars['labels']->value['version'];?>
</th>
  			     <th>&nbsp;</th>
  			     <th style="width:15%"><?php echo $_smarty_tpl->tpl_vars['labels']->value['update_to_version'];?>
</th>
  			     <th>&nbsp;</th>
            </tr>   
            
            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['ts']->value['testcases'], 'tcase');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['tcase']->value) {
?>
              
                            <?php $_smarty_tpl->_assignInScope('is_active', 0);?>
              <?php $_smarty_tpl->_assignInScope('is_linked', 0);?>
              <?php if ($_smarty_tpl->tpl_vars['tcase']->value['linked_version_id'] != 0) {?>
                 <?php $_smarty_tpl->_assignInScope('is_linked', 1);?>
              <?php }?>
              
                   		  <?php if ($_smarty_tpl->tpl_vars['is_linked']->value) {?>
      			    <tr class="testlink">
      			      <td width="20">
        				    <input type='hidden' name='a_tcid[<?php echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
]' value='<?php echo $_smarty_tpl->tpl_vars['tcase']->value['linked_version_id'];?>
' />
        				    <?php if ($_smarty_tpl->tpl_vars['tcase']->value['canUpdateVersion']) {?>
        				      <input type='checkbox' name='<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
]' 
        				             id='<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;
echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
' value='<?php echo $_smarty_tpl->tpl_vars['tcase']->value['linked_version_id'];?>
' /> 
        				    <?php }?>
      			      </td>
					<td>
						<img class="clickable" src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['history_small'];?>
"
						     onclick="javascript:openExecHistoryWindow(<?php echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
);"
						     title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['execution_history'];?>
" />
						<img class="clickable" src="<?php echo $_smarty_tpl->tpl_vars['tlImages']->value['edit'];?>
"
						     onclick="javascript:openTCaseWindow(<?php echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
);"
						     title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['design'];?>
" />
						<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->testCasePrefix, ENT_QUOTES, 'UTF-8', true);
echo htmlspecialchars($_smarty_tpl->tpl_vars['tcase']->value['external_id'], ENT_QUOTES, 'UTF-8', true);
echo $_smarty_tpl->tpl_vars['gsmarty_gui']->value->title_separator_1;
echo htmlspecialchars($_smarty_tpl->tpl_vars['tcase']->value['name'], ENT_QUOTES, 'UTF-8', true);?>

      			      </td>
  
                  <td style="text-align:center;">
                  	<?php echo $_smarty_tpl->tpl_vars['tcase']->value['tcversions'][$_smarty_tpl->tpl_vars['tcase']->value['linked_version_id']];?>

                  </td>
                  <td style="text-align:center;">
                  	&nbsp;
                  </td>
  
                  <td style="text-align:center;">
                  	  <?php if ($_smarty_tpl->tpl_vars['tcase']->value['updateTarget'] != '') {?>	
                      <select name="new_tcversion_for_tcid[<?php echo $_smarty_tpl->tpl_vars['tcase']->value['id'];?>
]">
           				       <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['tcase']->value['updateTarget'],'disabled'=>'disabled'),$_smarty_tpl);?>

           			  </select>
           			  <?php }?>
                  </td>
         
                        
                  <?php if ($_smarty_tpl->tpl_vars['ts']->value['linked_testcase_qty'] > 0) {?>
           				<td>
                       <?php if ($_smarty_tpl->tpl_vars['tcase']->value['executed'] == 'yes') {?>
                              &nbsp;&nbsp;&nbsp;<?php echo $_smarty_tpl->tpl_vars['labels']->value['has_been_executed'];?>

                       <?php }?>    
           				</td>
                  <?php }?>
                        
                </tr>
             <?php }?> 
    	     <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
          </table>
          
          <br />
       <?php }?>        </div>
  
  	<?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
  </div>
  <?php }?>  

  <?php if ($_smarty_tpl->tpl_vars['gui']->value->operationType == 'bulk') {?>
  <input type="hidden" name="update_all_value"  id="update_all_value"  value="1" />
	    <br/><table class="simple_tableruler">
	      <tr>
			    
			    <th class="clickable_icon">
             <img src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/toggle_all.gif" border="0" 
	                alt="<?php echo $_smarty_tpl->tpl_vars['labels']->value['check_uncheck_all'];?>
" title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['check_uncheck_all'];?>
" 
                  onclick="cs_all_checkbox_in_div('updateTcForm','<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;?>
','update_all_value');" />
       
	        </th>
			    <th><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_test_case'];?>
</th>
			    <th><?php echo $_smarty_tpl->tpl_vars['labels']->value['linked_version'];?>
</th>
			    <th><?php echo $_smarty_tpl->tpl_vars['labels']->value['newest_version'];?>
</th>
			    <th><?php echo $_smarty_tpl->tpl_vars['labels']->value['compare'];?>
</th>
	      </tr>   
	    
	      <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->testcases, 'tc');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['tc']->value) {
?>
	     	<?php $_smarty_tpl->_assignInScope('item_number', $_smarty_tpl->tpl_vars['item_number']->value+1);?>
	      <tr class="testlink">
	      	<td width="20">
      		 	<input type='checkbox' name='<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
]' id='<?php echo $_smarty_tpl->tpl_vars['update_cb']->value;
echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
' 
      				     value='<?php echo $_smarty_tpl->tpl_vars['tc']->value['tcversion_id'];?>
' checked="checked" /> 
      			<input type='hidden' name='a_tcid[<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
]' value='<?php echo $_smarty_tpl->tpl_vars['tc']->value['newest_tcversion_id'];?>
' />
    		</td>
	      
			  <td>
			  <img class="clickable" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/history_small.png"
			       onclick="javascript:openExecHistoryWindow(<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
);"
			       title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['execution_history'];?>
" />
			  <img class="clickable" src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/edit_icon.png"
			       onclick="javascript:openTCaseWindow(<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
);"
			       title="<?php echo $_smarty_tpl->tpl_vars['labels']->value['design'];?>
" />
			    <?php echo $_smarty_tpl->tpl_vars['tc']->value['path'];
echo htmlspecialchars($_smarty_tpl->tpl_vars['gui']->value->testCasePrefix, ENT_QUOTES, 'UTF-8', true);
echo htmlspecialchars($_smarty_tpl->tpl_vars['tc']->value['tc_external_id'], ENT_QUOTES, 'UTF-8', true);?>
:<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['tc']->value['name'], ENT_QUOTES, 'UTF-8', true);?>
 </td>  
			  <td align="center"> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['tc']->value['version'], ENT_QUOTES, 'UTF-8', true);?>
 </td>
			  <td align="center">
			  <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['tc']->value['newest_version'], ENT_QUOTES, 'UTF-8', true);?>
 
			  <input type="hidden" name="new_tcversion_for_tcid[<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
]" value="<?php echo $_smarty_tpl->tpl_vars['tc']->value['newest_tcversion_id'];?>
" />
			  </td>
			  <td align="center">
			  <a href="lib/testcases/tcCompareVersions.php?testcase_id=<?php echo $_smarty_tpl->tpl_vars['tc']->value['tc_id'];?>
&version_left=<?php echo $_smarty_tpl->tpl_vars['tc']->value['version'];?>
&version_right=<?php echo $_smarty_tpl->tpl_vars['tc']->value['newest_version'];?>
&compare_selected_versions=1&use_html_comp=1" target="_blank">
			  <img src="<?php echo @constant('TL_THEME_IMG_DIR');?>
/magnifier.png"></img></a>
			  </td>
	      </tr>
	  	  <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
	  	</table>

  <?php }?>
 
    <br>   
    <input type="submit" id="update_btn" name="update_btn" style="padding-right: 20px;"
           value='<?php echo $_smarty_tpl->tpl_vars['labels']->value['btn_update_testplan_tcversions'];?>
'  />
    <input type="hidden" name="doAction" id="doAction" value="<?php echo $_smarty_tpl->tpl_vars['gui']->value->buttonAction;?>
" />  
  </form>
<?php } else { ?>
  	<h2><?php echo $_smarty_tpl->tpl_vars['gui']->value->user_feedback;?>
</h2>
<?php }?>


<?php if ($_smarty_tpl->tpl_vars['gui']->value->refreshTree) {?>
	<?php $_smarty_tpl->_subTemplateRender("file:inc_refreshTreeWithFilters.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
	<?php }?>

</body>
</html>
<?php }
}
