This file serves as the entry point for SimpleDesk generally, as well as the home of the ticket listing code, for open, closed and deleted tickets.
Several things are done here, the results of which are unilaterally assumed by all other SimpleDesk functions.
This function sets up multiple blocks to be shown to users, defines what columns these blocks should have and states the rules to be used in getting the data. Each block has multiple parameters, and is stated in $context['ticket_blocks']:
This provides the ability to see all of a given type of ticket at once without paging through them, which are all sortable.
Much like the main helpdesk, this function prepares a list of all the closed/resolved tickets, with a more specific list of columns that is better suited to resolved tickets.
Much like the main helpdesk, this function prepares a list of all the deleted tickets, with a more specific list of columns that is better suited to recyclable or permadeletable tickets.
Actually performs the queries to get data for each block, subject to the parameters specified by the calling functions. It also sets up per-block pagination links, collects a variety of data (enough to populate all the columns as listed in shd_main_helpdesk, even if not entirely applicable, and populates it all into $context['ticket_blocks']['tickets'], extending the array that was already there.
In order to centralise the list of actions to be displayed in a block, and in its counterpart that displays all the values, the lists of columns per block is kept here.
Parameter: $block
Expected type: string
The block we are calling from: - assigned: assigned to me - new: new tickets - staff: pending staff - user_staff: pending with user (staff view) - user_user: pending with user (user view) - closed: resolved tickets - recycled: deleted tickets - withdeleted: tickets with deleted replies
Page created in 0.016 seconds with 11 queries.