src/pyams_zodbbrowser/zmi/templates/zodbhistory.pt
changeset 0 a02202f95e2c
child 9 084d3778c025
equal deleted inserted replaced
-1:000000000000 0:a02202f95e2c
       
     1 <div class="zodbbrowser"
       
     2 	 data-ams-plugins="zodbbrowser"
       
     3 	 data-ams-plugin-zodbbrowser-src="/--static--/pyams_zodbbrowser/js/zodbbrowser.js"
       
     4 	 data-ams-plugin-zodbbrowser-css="/--static--/pyams_zodbbrowser/css/zodbbrowser.css">
       
     5 	<div class="heading">
       
     6 		<h1 id="path">
       
     7 			ZODB transactions
       
     8 		</h1>
       
     9 
       
    10 		<h1 id="goto" style="display:none">
       
    11 			<input type="hidden" id="api" name="api" value="#zodbbrowser_path_to_oid" />
       
    12 			<input type="text" class="goto" id="gotoInput" name="goto" />
       
    13 		</h1>
       
    14 		<span id="pathError" style="display:none"></span>
       
    15 	</div>
       
    16 
       
    17 	<div class="history">
       
    18 		<div tal:condition="python: view.page > 0">
       
    19 			<h4 class="paging transaction" tal:define="prev_page python:view.page - 1">
       
    20 				<a class="title" tal:attributes="href string:#zodbbrowser_history?page=${prev_page}">Newer</a>
       
    21 			</h4>
       
    22 		</div>
       
    23 		<div tal:condition="python: view.page == 0"
       
    24 				tal:attributes="class python:'tid' in request.params and 'none' or 'latest'">
       
    25 			<h4 class="transaction">
       
    26 				<a class="title" href="#zodbbrowser_history">Latest</a>
       
    27 			</h4>
       
    28 		</div>
       
    29 		<div class="transaction" tal:repeat="history view.listHistory()"
       
    30 				tal:attributes="class python:history['current']
       
    31 				and 'transaction current' or 'transaction'">
       
    32 			<h4 class="transaction" tal:attributes="id string:tid${history.utid}">
       
    33 				<a class="title" tal:attributes="href history.href">
       
    34 					#<span tal:replace="history.index" />:
       
    35 					<span class="timestamp" tal:content="string:${history.utc_timestamp}" title="UTC" />
       
    36 					<span class="user" tal:content="history.user_id"
       
    37 							tal:attributes="title string:user from site ${history.user_location}" />
       
    38 					<span class="location" tal:content="history.location|nothing"
       
    39 				  			tal:attributes="title string:request type ${history.request_type|nothing}" />
       
    40 					<span class="description" tal:content="history.description" />
       
    41 				</a>
       
    42 			</h4>
       
    43 
       
    44 			<div class="diff">
       
    45 				<h5 class="expander">
       
    46 					<img src="/--static--/pyams_zodbbrowser/img/collapse.png"
       
    47 						 alt="collapse"
       
    48 							tal:condition="not:history.hidden"
       
    49 							/><img src="/--static--/pyams_zodbbrowser/img/expand.png"
       
    50 								   alt="expand"
       
    51 						tal:condition="history.hidden"
       
    52 						/>&nbsp;<span tal:replace="history.summary">N objects saved</span>
       
    53 				</h5>
       
    54 
       
    55 				<div class="collapsible"
       
    56 						tal:attributes="style python: history['hidden'] and 'display: none' or None">
       
    57 					<ol>
       
    58 						<li tal:repeat="obj history.objects">
       
    59 							<a tal:attributes="href obj.url" tal:content="obj.path">/(path)</a>
       
    60 							<span tal:replace="obj.class_repr" />
       
    61 							<a tal:attributes="href obj.url" tal:content="structure obj.repr">(obj)</a>
       
    62 						</li>
       
    63 					</ol>
       
    64 				</div>
       
    65 			</div>
       
    66 		</div>
       
    67 		<div tal:condition="python: view.page < view.last_page">
       
    68 			<h4 class="paging transaction" tal:define="next_page python:view.page + 1">
       
    69 				<a class="title" tal:attributes="href string:#zodbbrowser_history?page=${next_page}">Older</a>
       
    70 			</h4>
       
    71 		</div>
       
    72 	</div>
       
    73 
       
    74 </div>
       
    75 <img id="collapseImg" style="display:none" alt=""
       
    76      src="/--static--/pyams_zodbbrowser/img/collapse.png" />
       
    77 <img id="expandImg" style="display:none" alt=""
       
    78      src="/--static--/pyams_zodbbrowser/img/expand.png" />