class Manhunt{ constructor(){ this.name = "manhunt"; } static isCustom(){ return true; } static CreateCustom(data){ document.getElementById("currentpage-content").innerHTML = `
${System.GetTable(Manhunt, data.data)}
`; } static GetColumns(){ return ["type","last_changed","info","id"] } static TableDataCreate(row, key){ if(key == "id"){ let destination = "" let destinationID = row[key] let allowed = false; if(row.type == "files"){ destination = "files.view" allowed = userrights.has(destination); } else if(row.type == "vehicle"){ destination = "regvehicle.view" allowed = userrights.has("regvehicles.view"); } else if(row.type == "weapon"){ destination = "regweapons.view" allowed = userrights.has(destination); } if(allowed){ return ` ` } else{ return `` } } else if(key == "last_changed"){ return ` ${System.formatTimestamp(row[key])} `; } else if(key == "type"){ return ` ${getTranslation("type_" + row[key])} `; } else if(key == "info"){ if(row.type == "files"){ let displayValue = ""; if(row[key]){ let tmp = row[key].split("\n"); for(let i=0; i") + breaked.join("
"); } } return `

${getTranslation("name")}: ${row.name}


${displayValue}

` ; } else if(row.type=="vehicle"){ return `

${getTranslation("plate")}: ${row.plate}

${getTranslation("owner")}: ${row.owner}

${getTranslation("veh_type")}: ${row.veh_type}

${getTranslation("veh_model")}: ${row.veh_model}

` ; } else if(row.type == "weapon"){ return `

${getTranslation("serialno")}: ${row.serialno}

${getTranslation("owner")}: ${row.owner}

${getTranslation("weapontype")}: ${row.weapontype}

${getTranslation("weaponmodel")}: ${row.weaponmodel}

` ; } } else{ return `${row[key]}`; } } }