Search:
Template:MindTouch > ToBeDeveloped > Task/To Do Lists > Template:TaskList

Template:TaskList

    Table of contents
    No headers
     wiki.Create {label: "New Task", path: page.path ..'/Assigned_Tasks', template: "TaskItem", title: 'Task Name'};
    
    
     var isLate= ["false"], BackColor = 'white'; 
     var todaysdate = date.format(date.changetimezone(date.now, user.timezone), "yyyy/mm/dd");
      if(wiki.pageexists(page.path ..'/Assigned_Tasks'))
       { 
       if(#wiki.getpage(page.path ..'/Assigned_Tasks').subpages > 0)
        { <table width="100%" class="sortable"><tbody>
              <th>
       <b>'User Name'</b>
             </th> 
              <th>
       <b>'Task Title'</b>
               </th>
                <th>
        <b>'Summary'</b>
               </th>
                <th>
        <b>'Start Date'</b>
                 </th>
                  <th> 
       <b>'End Date'</b>
                 </th>
                  <th>
       <b>'Priority'</b>
                 </th>
               <th>
      <b>'Status'</b> 
      </th>
      foreach(var p in wiki.getpage(page.path ..'/Assigned_Tasks').subpages)
      { var utext = xml.text(wiki.page(p.path),"//*[@class='username']");
       var stext = xml.text(wiki.page(p.path),"//*[@class='summary']"); 
       var sdtext = xml.text(wiki.page(p.path),"//*[@class='startdate']");   
       var edtext = xml.text(wiki.page(p.path),"//*[@class='enddate']");
       var prtext = xml.text(wiki.page(p.path),"//*[@class='priority']"); 
       var sttext = xml.text(wiki.page(p.path),"//*[@class='status']");
       if(date.IsAfter(todaysdate,edtext)) {
                  
                   let BackColor = 'red'; 
                   } else { 
       if(date.IsSameDay(todaysdate,edtext)) {                 
                    let IsLate = 'false'; 
                    let BackColor = 'yellow'; 
                   } else { 
                        let IsLate = 'false'; 
                        let BackColor = 'white'; 
               } 
                 } 
       if(string.toupper(string.trim(sttext)) == 'C') { 
              <tr BGCOLOR="Mediumspringgreen">
         <td> 
            <strike> utext; </strike> 
                                    </td> 
        <td>
           <strike> web.link(p.uri, p.title); </strike>
                                                     </td>
     <td>
         <strike> stext; </strike>
                                  </td>
      <td> 
           <strike> sdtext; </strike> 
                                   </td> 
      <td> 
            <strike> edtext; </strike>
                                      </td> 
     <td> 
            <strike> prtext; </strike> 
                                     </td> 
     <td> 
          <strike> sttext; </strike> 
                                    </td> 
                                      </tr> 
     } else { <tr BGCOLOR=(BackColor)>
     <td>utext; </td >
    <td>
       wiki.edit{label: p.title, path: p.path, button: 'false'};
                                                              </td>
       <td> stext; </td> 
       <td> sdtext; </td>
        <td> edtext; </td>
         <td> prtext; </td>
          <td> sttext; </td>
           </tr>
            } }
             </tbody>
               </table>
        } else { 'There are currently no tasks assigned' } } 
        else { 'There are currently no tasks assigned' } 
       

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Files (0)

     

    Comments (0)

    You must login to post a comment.