Render Work Log
Page elements related to WorkLog topics

23 May 2022 - 16:57 | Version 12 |

Documentation

TODO

Parameters

Implementation

%STARTINCLUDE%
%INCLUDE{"%WEB%.WorkLog" section="postform"}%
%STARTSECTION{"worklogtable"}%%JQREQUIRE{"datatables,ui::autocomplete"}%%TWISTY{
    link="%BUTTON{
    "Advanced Filter"
    icon="fa-filter"
    class="foswikiRight"
  }%%CLEAR%"
  mode="div"
}%<form action='%SCRIPTURL{"view"}%/%BASEWEB%/%BASETOPIC%'>
<div style='overflow-y:scroll'><table class='foswikiTable foswikiLeft' style='width:100%'><tr>
%RENDERFOREDIT{
   form="%WEB%.WorkLog"
   fields="Who,Date,Summary,Tag"
   prefix="filter_"
   format="<th title='$description'>$title:</th><td>$edit</td>"
   separator=""
   Who_size="20"
   Who_value="%URLPARAM{"Who" default="%IF{"$'WIKINAME'!='LynnwoodBrown'" then="%WIKINAME%"}%"}%"
   Summary_size="30"
   Summary_value="%URLPARAM{Summary}%"
   Date_value="%URLPARAM{Date}%"
   Date_description="Accepts partial date strings such as just the Month"
   Tag_size="8"
   Tag_value="%URLPARAM{Tag}%"
}%<td><th>Include Paid</th><td><input type='hidden' name='paid' value='n'/><input type="checkbox" name='paid' value="y" %IF{"'%URLPARAM{"paid" multiple="on" separator="-"}%'~'*y'" then="checked='checked'"}%/></td>
<th><input type='submit' value=' Submit ' /></th></tr>
</table></div>
</form>
%ENDTWISTY%
%SET{"PAID" 
   value="%DBQUERY{"TopicType =~ 'WorkPayment'"
                web="%BASEWEB%"
                format="$formfield(Records)"
                separator=", "
            }%"
}%
%DBQUERY{"form = 'WorkLog'%IF{"(not defined Who or $'Who'='') and $'WHOLOG'='all'" 
      else=" AND Who =~ '%URLPARAM{"Who" default="%WIKINAME%"}%'"
   }%%IF{"defined filter_Date and $'filter_Date'!=''" 
      then=" AND Date_origvalue =~ '$percntURLPARAM{filter_Date}$percnt'"
   }%%IF{"defined Summary and $'Summary'!=''" 
      then=" AND Summary =~ '$percntURLPARAM{Summary}$percnt'"
   }%%IF{"defined Tag and $'Tag'!=''" 
      then=" AND Tag =~ '$percntURLPARAM{Tag}$percnt'"
   }%"
   web="Log"
   sort="Date"
   reverse="on"
   header="<div class=\"jqDataTablesContainer\" data-searching=\"true\" data-info=\"true\" data-paginate=\"true\" data-order=\"\">$n| *Date* | *Hours* | *Summary* |%IF{"$'WIKINAME'='LynnwoodBrown'" then=" *Note* |"}% *Who* | *Category* | *Tag* |$n"
   footer="$n</div>"
   format="|  $formatTime($formfield(Date), '$day $mon $year')  <a href='%SCRIPTURL{edit}%/$web/$topic?t=%SERVERTIME{$epoch}%&redirectto=$percntENCODE{\"%BASEWEB%.%BASETOPIC%?%QUERYSTRING%\" type=\"url\"}$percnt' title='Edit record'>$percntJQICON{\"fa-pencil\"}$percnt</a>  | $formfield(Hours) | [[$web.$topic][$expand(Summary or topic)]] |%IF{"$'WIKINAME'='LynnwoodBrown'" then=" $formfield(Note) |"}% [[$percntIF{\"'$formfield(Who)'~'Main*'\" else=\"Main.\"}$percnt$formfield(Who)]] | $percntFORMATLIST{\"$formfield(Category)\" format=\"[[$web.$1]]\"}$percnt | $percntIF{\"'%PAID%'=~'.*\b$topic\b.*'\" then=\"<span style='color:red'>paid</span> \"}$percnt$formfield(Tag)  |"
   separator="$n"
   nullformat=" __No un-paid entries found. To see all entries, open \"Advanced Filter\" and select \"Include Paid.\"__ "
   %IF{"'%URLPARAM{"paid" multiple="on" separator="-"}%'~'*y'" else="exclude=\"%PAID%\""}%
}%
%ENDSECTION{"worklogtable"}%%STOPINCLUDE%

<table class='foswikiTable foswikiLeft' style='width:100%'><tr><td>%INCLUDE{ 
 "%SYSTEMWEB%.JQueryAjaxHelper" 
 section="userselector" 
 INPUT_NAME="Who" 
 INPUT_VALUE="%WIKINAME%"
}% 
</select></td><th><input type='submit' value='Filter List' /></th></tr></table>

Calls to 'RenderWorkLog'

Copyright

© 2015 Your Name

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Middle Fork Home Wiki? Send feedback
Syndicate this site RSS