Template:TaskListMaster

    Inhaltsverzeichnis
    keine Gliederung

    Version seit 10:40, 23 Nov 2024

    zu dieser Version.

    Zurück zu Versionshistorie.

    Zeige aktuelle Version

    /* User Variables */
    var srcpath = ($0 ?? args.path ..'/*');
    var showcomplete = ($1 ?? args.showcomplete ?? 'true');
    var onlymine = ($2 ?? args.onlymine ?? 'true');
    var excludepages = ($3 ?? args.exclude ??  [""]);
    
    /* System Variables DO NOT EDIT below this line! */
    if(srcpath == '/*') {let srcpath = 'type: wiki AND title: "Teilprojekte"'} else { let srcpath = 'type: wiki AND title: "Teilprojekte" AND path: ' ..string.replace(srcpath, 'User:','User\\:')}
    
    var IsLate='false';
    var BackColor = 'white';
    var todaysdate = date.format(date.changetimezone(date.now, user.timezone), "yyyy/MM/dd");
    var listpage = 'true';
    
    var globalexcludepages = ["XXX/XXX/Teilprojekte",
                                    "User:rberinger/Teilprojekte"];
    
    <table width="100%" class="sortable"><tbody>
        <th>
            <b>'Projektbereich'</b>
        </th>
        <th>
            <b>'Verantwortlich'</b>
        </th>
        <th>
            <b>'Teilprojektname'</b>
        </th>
        <th>
            <b>'Details'</b>
        </th>
        <th>
            <b>'Start'</b>
        </th>
        <th>
            <b>'Deadline'</b>
        </th>
        <th>
            <b>'Prio'</b>
        </th>
        <th>
            <b>'Status'</b>
        </th>
    
        foreach(var t in wiki.getsearch('Teilprojekte', 100, 'title', srcpath )) {
             let listpage = 'true';
    
             foreach(var e in excludepages) {
                 if(e == t.path) {
                     let listpage = 'false';
                 }
             }
    
             foreach(var e in globalexcludepages) {
                 if(e == t.path) {
                     let listpage = 'false';
                 }
             }
    
    if(listpage == 'true') {
            if(#t.subpages > 0) {
      foreach(var p in t.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 IsLate = 'true';
                    let BackColor = '#FF9999';
                } else {
                    if(date.IsSameDay(todaysdate,edtext)) {
                         let IsLate = 'false';
                         let BackColor = '#FFFF99';
                    } else {
                         let IsLate = 'false';
                         let BackColor = 'white';
                    }
                }
    
    let listitem = 'true';
    if(onlymine == 'true') {
        if(!string.contains(string.tolower(utext),user.name)) {
            let listitem = 'false'
        }
    }
    
    if(listitem == 'true') {
    if(string.toupper(string.trim(sttext)) == 'C') {
      if(showcomplete == 'true') {
       <tr BGCOLOR="Mediumspringgreen">
            <td>
            <strike>
                web.link(p.parent.parent.uri,p.parent.parent.title);
            </strike>
            </td>
            <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>
                web.link(p.parent.parent.uri,p.parent.parent.title);
            </td>
            <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>
    
    
    
    Deki Appliance - Powered by TurnKey Linux