Blame Identity/Webenv/App/Trac/templates/query.cs

f2e824
f2e824
f2e824
f2e824
f2e824
 if:query.report_href ?>
    f2e824
      
  • f2e824
        var:query.report_href ?>">Available Reports
    f2e824
      
  • Custom Query
  • f2e824
     /if ?>
    f2e824
    f2e824
    f2e824
    (
    f2e824
     alt:v ?>No matches)
    f2e824
    /def ?>
    f2e824
    f2e824
    f2e824
     

    f2e824
    f2e824
    <form id="query" method="post" action="<?cs var:trac.href.query ?>">
    f2e824
     <fieldset id="filters">
    f2e824
      <legend>Filters</legend>
    f2e824
      
    f2e824
       set:checked = 0 ?>
    f2e824
       each:value = constraint.values ?>
    f2e824
        if:(value == option) == (constraint.mode == '') ?>
    f2e824
          set:checked = 1 ?>
    f2e824
        /if ?>
    f2e824
       /each ?>
    f2e824
       if:checked ?> checked="checked"
    f2e824
      /def ?>
    f2e824
      
    f2e824
       
    f2e824
       each:field = query.fields ?>
    f2e824
       each:constraint = query.constraints ?>
    f2e824
        if:name(field) == name(constraint) ?>
    f2e824
         
    f2e824
          <label></label>
    f2e824
          if:field.type != "radio" && field.type != "checkbox" ?>
    f2e824
           
    f2e824
            <select name="<?cs var:name(field) ?>_mode">
    f2e824
             each:mode = query.modes[field.type] ?>
    f2e824
              
    f2e824
               if:mode.value == constraint.mode ?> selected="selected"
    f2e824
               /if ?>></option>
    f2e824
             /each ?>
    f2e824
            </select>
    f2e824
           
    f2e824
          /if ?>
    f2e824
          
    f2e824
            if:field.type == "radio" || field.type == "checkbox" ?> colspan="2"
    f2e824
            /if ?>>
    f2e824
           if:field.type == "select" ?>
    f2e824
            each:value = constraint.values ?>
    f2e824
             <select name="<?cs var:name(constraint) ?>"><option></option>
    f2e824
             each:option = field.options ?>
    f2e824
              <option<?cs if:option == value ?> selected="selected">
    f2e824
                var:option ?></option>
    f2e824
             /each ?></select>
    f2e824
             if:name(value) != len(constraint.values) - 1 ?>
    f2e824
              
    f2e824
              
    f2e824
                 var:name(field) ?>_" value="-" />
    f2e824
             
    f2e824
              <label>or</label>
    f2e824
              
    f2e824
             /if ?>
    f2e824
            /each ?>
    f2e824
           elif:field.type == "radio" ?>
    f2e824
            each:option = field.options ?>
    f2e824
             
    f2e824
               var:option ?>" name="" value="
    f2e824
               var:option ?>" />
    f2e824
             <label for="<?cs var:name(field) ?>_<?cs var:option ?>">
    f2e824
               alt:option ?>none</label>
    f2e824
            /each ?>
    f2e824
           elif:field.type == "checkbox" ?>
    f2e824
            
    f2e824
              var:name(field) ?>" value="1"
    f2e824
              if:constraint.mode != '!' ?> checked="checked" />
    f2e824
            <label for="<?cs var:name(field) ?>_on">yes</label>
    f2e824
            
    f2e824
              var:name(field) ?>" value="!1"
    f2e824
              if:constraint.mode == '!' ?> checked="checked" />
    f2e824
            <label for="<?cs var:name(field) ?>_off">no</label>
    f2e824
           elif:field.type == "text" ?>
    f2e824
            each:value = constraint.values ?>
    f2e824
            
    f2e824
              var:value ?>" size="42" />
    f2e824
             if:name(value) != len(constraint.values) - 1 ?>
    f2e824
              
    f2e824
              
    f2e824
                 var:name(field) ?>_" value="-" />
    f2e824
             
    f2e824
              <label>or</label>
    f2e824
              
    f2e824
             /if ?>
    f2e824
            /each ?>
    f2e824
           /if ?>
    f2e824
          
    f2e824
          
    f2e824
             var:name(field) ?>
    f2e824
             if:field.type != 'radio' ?>_
    f2e824
              var:len(constraint.values) - 1 ?>
    f2e824
             /if ?>" value="-" />
    f2e824
         
    f2e824
        /each ?>
    f2e824
       /each ?>
    f2e824
       
    f2e824
        
    f2e824
         <label for="add_filter">Add filter</label> 
    f2e824
         <select name="add_filter" id="add_filter">
    f2e824
          <option></option>
    f2e824
          each:field = query.fields ?>
    f2e824
           
    f2e824
             if:field.type == "radio" ?>
    f2e824
              if:len(query.constraints[name(field)]) != 0 ?> disabled="disabled"
    f2e824
              /if ?>
    f2e824
             /if ?>></option>
    f2e824
          /each ?>	
    f2e824
         </select>
    f2e824
         <input type="submit" name="add" value="+" />
    f2e824
        
    f2e824
       
    f2e824
      
    f2e824
     </fieldset>
    f2e824
     

    f2e824
      <label for="group">Group results by</label>
    f2e824
      <select name="group" id="group">
    f2e824
       <option></option>
    f2e824
       each:field = query.fields ?>
    f2e824
        if:field.type == 'select' || field.type == 'radio' ||
    f2e824
           name(field) == 'owner' ?>
    f2e824
         
    f2e824
           if:name(field) == query.group ?> selected="selected">
    f2e824
           var:field.label ?></option>
    f2e824
        /if ?>
    f2e824
       /each ?>
    f2e824
      </select>
    f2e824
      
    f2e824
        if:query.groupdesc ?> checked="checked" />
    f2e824
      <label for="groupdesc">descending</label>
    f2e824
      <script type="text/javascript">
    f2e824
        var group = document.getElementById("group");
    f2e824
        var updateGroupDesc = function() {
    f2e824
          enableControl('groupdesc', group.selectedIndex > 0);
    f2e824
        }
    f2e824
        addEvent(window, 'load', updateGroupDesc);
    f2e824
        addEvent(group, 'change', updateGroupDesc);
    f2e824
      </script>
    f2e824
     

    f2e824
     

    f2e824
      
    f2e824
        if:query.verbose ?> checked="checked" />
    f2e824
      <label for="verbose">Show full description under each result</label>
    f2e824
     

    f2e824
     
    f2e824
      <input type="hidden" name="order" value="<?cs var:query.order ?>" />
    f2e824
      <input type="hidden" name="desc" value="1" />
    f2e824
      <input type="submit" name="update" value="Update" />
    f2e824
     
    f2e824
     
    f2e824
    </form>
    f2e824
    <script type="text/javascript">
    f2e824
     var properties={
    f2e824
      var:name(field) ?>:{type:"",label:"
    f2e824
      var:field.label ?>",options:[
    f2e824
       each:option = field.options ?>""
    f2e824
        if:name(option) < len(field.options) -1 ?>,
    f2e824
       /each ?>]}
    f2e824
      set:idx = idx + 1 ?>,
    f2e824
     /each ?>};
    f2e824
     var modes = {:[
    f2e824
      each:mode = type ?>{text:"",value:""}
    f2e824
       if:name(mode) < len(type) -1 ?>,
    f2e824
      /each ?>]
    f2e824
      set:idx = idx + 1 ?>,
    f2e824
     /each ?>};
    f2e824
     initializeFilters();
    f2e824
    </script>
    f2e824
    f2e824
    f2e824
     
    f2e824
      
    f2e824
        if:query.desc ?>descasc">
    f2e824
       
    f2e824
         if:query.order == header.name && !query.desc ?> (descending)
    f2e824
         /if ?>" href="">
    f2e824
      
    f2e824
     /each ?>
    f2e824
    f2e824
    f2e824
    f2e824
     if:!query.group ?>
    f2e824
      
    f2e824
      
    f2e824
     /if ?>
    f2e824
     each:result = query.results ?>
    f2e824
      if:result[query.group] != prev_group ?>
    f2e824
       
    f2e824
       

    f2e824
        each:field = query.fields ?>
    f2e824
         if:name(field) == query.group ?>
    f2e824
          var:field.label ?>
    f2e824
         /if ?>
    f2e824
        /each ?>:  
    f2e824
       
    f2e824
       
    f2e824
      /if ?>
    f2e824
      
    f2e824
       if:name(result) % 2 ?>oddeven prio
    f2e824
       var:result.priority_value ?>
    f2e824
       if:result.added ?> added
    f2e824
       if:result.changed ?> changed
    f2e824
       if:result.removed ?> removed">
    f2e824
      each:header = query.headers ?>
    f2e824
       if:name(header) == 0 ?>
    f2e824
        var:result.href ?>" title="View ticket">
    f2e824
       else ?>
    f2e824
         if:header.name == 'summary' ?>
    f2e824
          var:result.href ?>" title="View ticket">
    f2e824
          var:result.summary ?>
    f2e824
         else ?>
    f2e824
         /if ?>
    f2e824
       /if ?>
    f2e824
      /each ?>
    f2e824
      
    f2e824
       
    f2e824
        

    Reported by ,

    f2e824
        :

    f2e824
        

    f2e824
       
    f2e824
      
    f2e824
     
    f2e824
    f2e824
    /if ?>
    f2e824
    f2e824
    f2e824
     Note: See TracQuery 
    f2e824
     for help on using queries.
    f2e824
    f2e824
    f2e824
    f2e824