Valerii Vasin (valerii) wrote in changelog,
Valerii Vasin
valerii
changelog

[ljcom] r12518: LJSUP-13377: Show text if where are no r...

Committer: vvasin
LJSUP-13377: Show text if where are no reserved or incoming on user account. Provide JS part.
U   trunk/templates/Shop/Wallet.tmpl
Modified: trunk/templates/Shop/Wallet.tmpl
===================================================================
--- trunk/templates/Shop/Wallet.tmpl	2012-08-22 09:21:51 UTC (rev 12517)
+++ trunk/templates/Shop/Wallet.tmpl	2012-08-22 10:51:38 UTC (rev 12518)
@@ -129,105 +129,103 @@
 		</li>
 
 		<TMPL_UNLESS wallet_ext_disabled>
-        	<li class="b-buy-goods-item b-reserved-item <TMPL_IF tab_reserved_active>current</TMPL_IF>">
+        	<li data-pagesize="<TMPL_VAR pagesize>" class="b-buy-goods-item b-reserved-item <TMPL_IF tab_reserved_active>current</TMPL_IF> <TMPL_UNLESS accounts>no-items</TMPL_UNLESS>">
         		<form action="<TMPL_VAR self_uri>?show=reserved" method="post" id="shop_reserved_token">
                                 <input type="hidden" name="act" value="revoke_account">
                                 <TMPL_VAR form_auth>
-					<TMPL_IF accounts>
-		        		<table class="b-tokens-reserved b-tokens-items">
-		        			<thead>
-				        		<tr>
-					        		<th>
-						        		<tmpl_var expr="ml('wallet.bml.reserved.subject')">
-							        	<p><tmpl_var expr="ml('wallet.bml.reserved.reservation')"></p>
-	        						</th>
-		        					<th class="b-tokens-items-amount">
-			        					<tmpl_var expr="ml('wallet.bml.reserved.blocked')">
-				        				<p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
-					        		</th>
-						        	<th class="b-tokens-items-amount">
-							        	<tmpl_var expr="ml('wallet.bml.reserved.balance')">
-								        <p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
-							        </th>
-						        </tr>
-							</thead>
-							<tbody class='b-reserved-data'>
-								<TMPL_IF tab_reserved_active>
-		    						<TMPL_LOOP accounts>
-		        						<tr <TMPL_IF __odd__> class="odd" </TMPL_IF>>
-			        						<td class="b-tokens-items-subject"><input type="checkbox" name="account_id" value="<TMPL_VAR id>" <TMPL_IF disabled>disabled</TMPL_IF> /><tmpl_var desc></td>
-				        					<td class="b-tokens-items-amount"><tmpl_var blocked></td>
-					        				<td class="b-tokens-items-amount"><tmpl_var balance></td>
-						         		</tr>
-									</TMPL_LOOP>
-								</TMPL_IF>
-							</tbody>
-							<tbody class="b-tokens-items-paging">
-								<tr>
-									<td colspan="3">
-										<TMPL_IF tab_reserved_active>
-											<TMPL_INCLUDE 'Paging.tmpl'>
-										</TMPL_IF>
-									</td>
-								</tr>
-							</tbody>
-			        		<tfoot class="b-tokens-reserved b-tokens-items">
-		        				<tr class="b-shop-tokens-total">
-			        				<td class="b-tokens-items-button"><input type="submit" value="<tmpl_var expr="ml('wallet.bml.reserved.takeoff')">" class="b-input-tokens-total" /><strong><tmpl_var expr="ml('wallet.bml.reserved.total')"></strong></td>
-				        			<td class="b-tokens-items-total b-total-refunded"><tmpl_var total_blocked></td>
-					        		<td class="b-tokens-items-total b-total-amount"><tmpl_var total_balance></td>
-						        </tr>
-					        </tfoot>
-				        </table>
-					<TMPL_ELSE>
+	        		<table class="b-tokens-reserved b-tokens-items">
+	        			<thead>
+			        		<tr>
+				        		<th>
+					        		<tmpl_var expr="ml('wallet.bml.reserved.subject')">
+						        	<p><tmpl_var expr="ml('wallet.bml.reserved.reservation')"></p>
+        						</th>
+	        					<th class="b-tokens-items-amount">
+		        					<tmpl_var expr="ml('wallet.bml.reserved.blocked')">
+			        				<p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
+				        		</th>
+					        	<th class="b-tokens-items-amount">
+						        	<tmpl_var expr="ml('wallet.bml.reserved.balance')">
+							        <p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
+						        </th>
+					        </tr>
+						</thead>
+						<tbody class='b-reserved-data'>
+							<TMPL_IF tab_reserved_active>
+	    						<TMPL_LOOP accounts>
+	        						<tr <TMPL_IF __odd__> class="odd" </TMPL_IF>>
+		        						<td class="b-tokens-items-subject"><input type="checkbox" name="account_id" value="<TMPL_VAR id>" <TMPL_IF disabled>disabled</TMPL_IF> /><tmpl_var desc></td>
+			        					<td class="b-tokens-items-amount"><tmpl_var blocked></td>
+				        				<td class="b-tokens-items-amount"><tmpl_var balance></td>
+					         		</tr>
+								</TMPL_LOOP>
+							</TMPL_IF>
+						</tbody>
+						<tbody class="b-tokens-items-paging">
+							<tr>
+								<td colspan="3">
+									<TMPL_IF tab_reserved_active>
+										<TMPL_INCLUDE 'Paging.tmpl'>
+									</TMPL_IF>
+								</td>
+							</tr>
+						</tbody>
+		        		<tfoot class="b-tokens-reserved b-tokens-items">
+	        				<tr class="b-shop-tokens-total">
+		        				<td class="b-tokens-items-button"><input type="submit" value="<tmpl_var expr="ml('wallet.bml.reserved.takeoff')">" class="b-input-tokens-total" /><strong><tmpl_var expr="ml('wallet.bml.reserved.total')"></strong></td>
+			        			<td class="b-tokens-items-total b-total-refunded"><tmpl_var total_blocked></td>
+				        		<td class="b-tokens-items-total b-total-amount"><tmpl_var total_balance></td>
+					        </tr>
+				        </tfoot>
+			        </table>
+					<span class="no-items">
 						<tmpl_var expr="ml('wallet.bml.reserved.notfound')">
-					</TMPL_IF>
+					</span>
 		        </form>
 			</li>
-			<li class="b-buy-goods-item b-incoming-item <TMPL_IF tab_incoming_active>current</TMPL_IF>">
-					<form action="" method="post" id="shop_incoming_token">
-						<TMPL_IF blockings>
-							<table class="b-tokens-incoming b-tokens-items">
-								<thead>
-									<tr>
-										<th><tmpl_var expr="ml('wallet.bml.incoming.date')"></th>
-										<th><tmpl_var expr="ml('wallet.bml.incoming.subject')"></th>
-										<th>
-											<tmpl_var expr="ml('wallet.bml.incoming.amount')">
-											<p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
-										</th>
+			<li data-pagesize="<TMPL_VAR pagesize>" class="b-buy-goods-item b-incoming-item <TMPL_IF tab_incoming_active>current</TMPL_IF> <TMPL_UNLESS blockings>no-items</TMPL_UNLESS>">
+				<form action="" method="post" id="shop_incoming_token">
+					<table class="b-tokens-incoming b-tokens-items">
+						<thead>
+							<tr>
+								<th><tmpl_var expr="ml('wallet.bml.incoming.date')"></th>
+								<th><tmpl_var expr="ml('wallet.bml.incoming.subject')"></th>
+								<th>
+									<tmpl_var expr="ml('wallet.bml.incoming.amount')">
+									<p><tmpl_var expr="ml('wallet.bml.reserved.tokens')"></p>
+								</th>
+							</tr>
+						</thead>
+						<tbody class="b-incoming-data">
+							<TMPL_IF tab_incoming_active>
+								<TMPL_LOOP blockings>
+									<tr <TMPL_IF __odd__> class="odd" </TMPL_IF>>
+										<td><tmpl_var date></td>
+										<td><tmpl_var desc></td>
+										<td class="b-tokens-items-amount"><tmpl_var qty></td>
 									</tr>
-								</thead>
-								<tbody class="b-incoming-data">
+								</TMPL_LOOP>
+							</TMPL_IF>
+						</tbody>
+						<tbody class="b-tokens-items-paging">
+							<tr>
+								<td colspan="3">
 									<TMPL_IF tab_incoming_active>
-										<TMPL_LOOP blockings>
-											<tr <TMPL_IF __odd__> class="odd" </TMPL_IF>>
-												<td><tmpl_var date></td>
-												<td><tmpl_var desc></td>
-												<td class="b-tokens-items-amount"><tmpl_var qty></td>
-											</tr>
-										</TMPL_LOOP>
+										<TMPL_INCLUDE 'Paging.tmpl'>
 									</TMPL_IF>
-								</tbody>
-								<tbody class="b-tokens-items-paging">
-									<tr>
-										<td colspan="3">
-											<TMPL_IF tab_incoming_active>
-												<TMPL_INCLUDE 'Paging.tmpl'>
-											</TMPL_IF>
-										</td>
-									</tr>
-								</tbody>
-								<tfoot class="b-tokens-reserved b-tokens-items">
-							        <tr class="b-shop-tokens-total">
-										<td colspan="3"></td>
-									</tr>
-						        </tfoot>
-							</table>
-                        <TMPL_ELSE>
-                                <tmpl_var expr="ml('wallet.bml.incoming.notfound')">
-                        </TMPL_IF>
-					</form>
+								</td>
+							</tr>
+						</tbody>
+						<tfoot class="b-tokens-reserved b-tokens-items">
+					        <tr class="b-shop-tokens-total">
+								<td colspan="3"></td>
+							</tr>
+				        </tfoot>
+					</table>
+					<span class="no-items">
+						<tmpl_var expr="ml('wallet.bml.incoming.notfound')">
+					</span>
+				</form>
 			</li>
 		</TMPL_UNLESS>
 

Tags: invis89, ljcom, tmpl, vvasin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments