Commit 4ce43abd92167caa9040f1fa38edeccfa85ba501

Authored by Megan Watson
1 parent 0a635508

KTS-3710

"Hardcoded on-screen text should not show for bulk actions if there is no files or folders to be listed."
Fixed. The text will only display if there are failed documents or folders.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9362 c91229c3-7414-0410-bfa2-8a42b809f60b
templates/ktcore/bulk_action_listing.smarty
1 <h2><img src="{if $config->get("ui/morphEnabled") == '1'}{$rootUrl}/skins/kts_{$config->get("ui/morphTo")}/title_bullet.png{else}{$rootUrl}/resources/graphics/title_bullet.png{/if}"/>{$context->getDisplayName()}</h2> 1 <h2><img src="{if $config->get("ui/morphEnabled") == '1'}{$rootUrl}/skins/kts_{$config->get("ui/morphTo")}/title_bullet.png{else}{$rootUrl}/resources/graphics/title_bullet.png{/if}"/>{$context->getDisplayName()}</h2>
2 2
  3 +{if count($failed.folders) || (count($failed.documents))}
3 <p class="descriptiveText">{i18n}The following list shows documents and folders in your list which cannot be acted on by this bulk action{/i18n}:</p> 4 <p class="descriptiveText">{i18n}The following list shows documents and folders in your list which cannot be acted on by this bulk action{/i18n}:</p>
4 5
5 -{if count($failed.folders)}  
6 -<table class="kt_collection">  
7 -<thead>  
8 -<tr>  
9 - <th colspan="2">{i18n}Folders{/i18n}</th>  
10 -</tr>  
11 -<tr>  
12 - <th width="20%">{i18n}Name{/i18n}</th>  
13 - <th>{i18n}Reason for failure{/i18n}</th>  
14 -</tr>  
15 -</thead>  
16 -  
17 -<tbody>  
18 -{foreach from=$failed.folders item=item}  
19 - <tr class="{cycle values=even,odd}">  
20 - <td>{$item.0|sanitize}</td>  
21 - <td>{$item.1|sanitize}</td>  
22 - </tr>  
23 -{/foreach}  
24 -</tbody>  
25 -</table>  
26 -<br/>  
27 -{/if}  
28 -  
29 -{if (count($failed.documents))}  
30 -  
31 -<table class="kt_collection">  
32 -<thead>  
33 -<tr>  
34 - <th colspan="2">{i18n}Documents{/i18n}</th>  
35 -</tr>  
36 -<tr>  
37 - <th width="20%">{i18n}Name{/i18n}</th>  
38 - <th>{i18n}Reason for failure{/i18n}</th>  
39 -</tr>  
40 -</thead>  
41 -  
42 -<tbody>  
43 -  
44 -{foreach from=$failed.documents item=item}  
45 - <tr class="{cycle values=even,odd}">  
46 - <td>{$item.0|sanitize}</td>  
47 - <td>{$item.1|sanitize}</td>  
48 - </tr>  
49 -{/foreach}  
50 -</tbody>  
51 -</table> 6 + {if count($failed.folders)}
  7 + <table class="kt_collection">
  8 + <thead>
  9 + <tr>
  10 + <th colspan="2">{i18n}Folders{/i18n}</th>
  11 + </tr>
  12 + <tr>
  13 + <th width="20%">{i18n}Name{/i18n}</th>
  14 + <th>{i18n}Reason for failure{/i18n}</th>
  15 + </tr>
  16 + </thead>
  17 +
  18 + <tbody>
  19 + {foreach from=$failed.folders item=item}
  20 + <tr class="{cycle values=even,odd}">
  21 + <td>{$item.0|sanitize}</td>
  22 + <td>{$item.1|sanitize}</td>
  23 + </tr>
  24 + {/foreach}
  25 + </tbody>
  26 + </table>
  27 + <br/>
  28 + {/if}
  29 +
  30 + {if (count($failed.documents))}
  31 + <table class="kt_collection">
  32 + <thead>
  33 + <tr>
  34 + <th colspan="2">{i18n}Documents{/i18n}</th>
  35 + </tr>
  36 + <tr>
  37 + <th width="20%">{i18n}Name{/i18n}</th>
  38 + <th>{i18n}Reason for failure{/i18n}</th>
  39 + </tr>
  40 + </thead>
  41 +
  42 + <tbody>
  43 +
  44 + {foreach from=$failed.documents item=item}
  45 + <tr class="{cycle values=even,odd}">
  46 + <td>{$item.0|sanitize}</td>
  47 + <td>{$item.1|sanitize}</td>
  48 + </tr>
  49 + {/foreach}
  50 + </tbody>
  51 + </table>
  52 + {/if}
52 {/if} 53 {/if}
53 54
54 55