127 lines
		
	
	
	
		
			5.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			127 lines
		
	
	
	
		
			5.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<metal:actions define-macro="favorites_portlet"
 | 
						|
               tal:define="view nocall:context/@@favorites_view;
 | 
						|
                           targetUid view/targetUid">
 | 
						|
  <form method="post">
 | 
						|
    <div dojoType="dojo.dnd.Source" withHandles="true" id="favorites_list">
 | 
						|
      <div class="dojoDndItem dojoDndHandle" style="padding: 0"
 | 
						|
           tal:repeat="item view/listFavorites">
 | 
						|
        <span style="float:right" class="delete-item"> <a
 | 
						|
            tal:attributes="href
 | 
						|
                  string:${view/virtualTargetUrl}/removeFavorite.html?id=${item/uid};
 | 
						|
                            title string:Remove from favorites"
 | 
						|
            i18n:attributes="title">X</a> </span>
 | 
						|
        <a tal:attributes="href item/url;
 | 
						|
                           title item/description"
 | 
						|
           tal:content="item/title">Some object</a>
 | 
						|
        <input type="hidden" name="favorite_uids:list"
 | 
						|
               tal:attributes="value item/trackUid" />
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <div>
 | 
						|
      <input type="submit" style="display: none"
 | 
						|
          name="favorites_change_order" id="favorites_change_order"
 | 
						|
          value="Save Changes"
 | 
						|
          i18n:attributes="value" />
 | 
						|
      <script language="javascript">
 | 
						|
      dojo.subscribe('/dnd/drop', function(data) {
 | 
						|
          if (data.node.id == 'favorites_list') {
 | 
						|
              dojo.byId('favorites_change_order').style.display = ''}});
 | 
						|
      </script>
 | 
						|
    </div>
 | 
						|
  </form>
 | 
						|
  <div id="addFavorite" class="action"
 | 
						|
       tal:condition="targetUid">
 | 
						|
    <a i18n:translate=""
 | 
						|
       tal:attributes="href
 | 
						|
              string:${view/virtualTargetUrl}/addFavorite.html?id=$targetUid;
 | 
						|
                       title string:Add current object to favorites"
 | 
						|
       i18n:attributes="title">Add to Favorites</a>
 | 
						|
  </div>
 | 
						|
</metal:actions>
 | 
						|
 | 
						|
 | 
						|
<metal:actions define-macro="filters_portlet"
 | 
						|
               tal:define="view nocall:context/@@filters_view;
 | 
						|
                           targetUid view/targetUid">
 | 
						|
    <div tal:repeat="item view/listFilters">
 | 
						|
      <span style="float:right" class="delete-item"> <a href="removeFilter.html"
 | 
						|
          tal:attributes="href
 | 
						|
                string:${view/virtualTargetUrl}/deactivateFilter.html?id=${item/uid};
 | 
						|
                          title string:Deactivate filter"
 | 
						|
          i18n:attributes="title">X</a> </span>
 | 
						|
      <a tal:attributes="href item/url;
 | 
						|
                         title item/description">
 | 
						|
        <span tal:content="item/title">Some object</span>
 | 
						|
        (<i i18n:translate="" tal:content="item/typeTitle">Type</i>)</a>
 | 
						|
    </div>
 | 
						|
    <div id="addFilter" class="action"
 | 
						|
         tal:condition="targetUid">
 | 
						|
      <a i18n:translate=""
 | 
						|
         tal:attributes="href
 | 
						|
                string:${view/virtualTargetUrl}/addFilter.html?id=$targetUid;
 | 
						|
                         title string:Use current object as filter"
 | 
						|
         i18n:attributes="title">Add Filter</a>
 | 
						|
    </div>
 | 
						|
</metal:actions>
 | 
						|
 | 
						|
 | 
						|
<metal:actions define-macro="notifications_portlet"
 | 
						|
               tal:define="view nocall:context/@@notifications_view;
 | 
						|
                           numNews python:len(view.getNotifications())">
 | 
						|
  <div tal:condition="not:numNews">
 | 
						|
    <a i18n:translate=""
 | 
						|
       tal:attributes="href macro/url">
 | 
						|
      No new notifications</a></div>
 | 
						|
  <div tal:condition="python:numNews == 1">
 | 
						|
    <a i18n:translate=""
 | 
						|
       tal:attributes="href macro/url">
 | 
						|
      <span i18n:name="numNews" tal:content="numNews" /> new notification</a>
 | 
						|
    <img src="/++resource++cybertools.icons/email.png"
 | 
						|
         alt="new notifications" />
 | 
						|
  </div>
 | 
						|
  <div tal:condition="python:numNews > 1">
 | 
						|
    <a i18n:translate=""
 | 
						|
       tal:attributes="href macro/url">
 | 
						|
      <span i18n:name="numNews" tal:content="numNews" /> new notifications</a>
 | 
						|
    <img src="/++resource++cybertools.icons/email.png"
 | 
						|
         alt="new notifications" />
 | 
						|
  </div>
 | 
						|
</metal:actions>
 | 
						|
 | 
						|
 | 
						|
<metal:block define-macro="notifications">
 | 
						|
  <div tal:attributes="class string:content-$level;">
 | 
						|
    <metal:title use-macro="item/concept_macros/concepttitle" />
 | 
						|
    <form name="notifications" method="post">
 | 
						|
      <input type="checkbox" name="show_all" id="notifications.show_all"
 | 
						|
             title="Show all notifications"
 | 
						|
             i18n:attributes="title"
 | 
						|
             onclick="submit()"
 | 
						|
             tal:attributes="checked request/form/show_all|nothing" />
 | 
						|
      <label for="notifications.show_all"
 | 
						|
             i18n:translate="">Show all notifications</label>
 | 
						|
      <br /> 
 | 
						|
      <table class="listing">
 | 
						|
        <tr class="header">
 | 
						|
          <th i18n:translate="">Date/Time</th>
 | 
						|
          <th i18n:translate="">Sender</th>
 | 
						|
          <th i18n:translate="">Object</th>
 | 
						|
          <th i18n:translate="">Message</th>
 | 
						|
          <th i18n:translate="">Date/Time Read</th>
 | 
						|
        </tr>
 | 
						|
        <tr tal:repeat="notif item/getNotificationsFormatted">
 | 
						|
          <td tal:content="notif/timeStamp" />
 | 
						|
          <td tal:define="sender notif/sender">
 | 
						|
            <a tal:omit-tag="not:sender/url"
 | 
						|
               tal:attributes="href sender/url"
 | 
						|
               tal:content="sender/label" /></td>
 | 
						|
          <td tal:define="object notif/object">
 | 
						|
            <a tal:attributes="href object/url"
 | 
						|
               tal:content="object/label" /></td>
 | 
						|
          <td tal:content="notif/text" />
 | 
						|
          <td tal:content="notif/read_ts" />
 | 
						|
        </tr>
 | 
						|
      </table>
 | 
						|
    </form>
 | 
						|
  </div>
 | 
						|
</metal:block>
 |