Fixed processes display in core except modules/display_processes.lua
This commit is contained in:
parent
45347e2ac7
commit
46dc48ffcc
@ -169,7 +169,14 @@ function modpol.interactions.org_dashboard(user, org_string)
|
||||
table.sort(modules)
|
||||
|
||||
-- list pending
|
||||
local process_msg = #org.processes .. " total processes"
|
||||
local processes = {}
|
||||
for i,v in ipairs(org.processes) do
|
||||
if v ~= "deleted" then
|
||||
processes[i] = org.processes[v]
|
||||
end
|
||||
end
|
||||
|
||||
local process_msg = #processes .. " total processes"
|
||||
if org.pending[user] then
|
||||
process_msg = process_msg .. " (" ..
|
||||
modpol.util.num_pairs(org.pending[user]) .. " pending)"
|
||||
@ -223,20 +230,17 @@ function modpol.interactions.org_dashboard(user, org_string)
|
||||
print("Error: Module not found.")
|
||||
modpol.interactions.org_dashboard(user, org.id)
|
||||
end
|
||||
|
||||
elseif sel == 'p' or sel == 'P' then
|
||||
local processes = {}
|
||||
|
||||
elseif sel == 'p' or sel == 'P' then -- Pending processes
|
||||
print("All processes: (* indicates pending)")
|
||||
for i,v in ipairs(org.processes) do
|
||||
if v ~= "deleted" then
|
||||
local active = ''
|
||||
if org.pending[user] then
|
||||
if org.pending[user][v.id] then
|
||||
active = '*'
|
||||
end
|
||||
for i,v in ipairs(processes) do
|
||||
local active = ''
|
||||
if org.pending[user] then
|
||||
if org.pending[user][v.id] then
|
||||
active = '*'
|
||||
end
|
||||
print("["..v.id.."] "..v.slug..active)
|
||||
end
|
||||
print("["..v.id.."] "..v.slug..active)
|
||||
end
|
||||
print()
|
||||
print("Interact with which one (use [id] number)?")
|
||||
|
@ -19,7 +19,7 @@ display_processes.config = {
|
||||
-- @param result Callback if this module is embedded in other modules
|
||||
function display_processes:initiate(result)
|
||||
local display_table = {}
|
||||
for k,v in pairs(self.org.processes) do
|
||||
for k,v in ipairs(self.org.processes) do
|
||||
if v ~= "deleted" then
|
||||
local input = v.id..": "..v.slug
|
||||
table.insert(display_table, input)
|
||||
|
Loading…
x
Reference in New Issue
Block a user