Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import tools.jackson.databind.ObjectMapper
import tools.jackson.dataformat.csv.CsvMapper
import hu.bme.sch.cmsch.controller.admin.ControlAction
import hu.bme.sch.cmsch.controller.admin.TwoDeepEntityPage
import hu.bme.sch.cmsch.controller.admin.calculateSearchSettings
import hu.bme.sch.cmsch.extending.FormSubmissionListener
import hu.bme.sch.cmsch.repository.ManualRepository
import hu.bme.sch.cmsch.service.*
Expand Down Expand Up @@ -111,7 +112,8 @@ class ResponsesController(
true,
"Exportálás CSV fájlba"
)
)
),
innerSearchSettings = calculateSearchSettings<ResponseEntity>(false),
) {

private val exportPermission = StaffPermissions.PERMISSION_EDIT_FORM_RESULTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ abstract class TwoDeepEntityPage<OUTER : IdentifiableEntity, INNER: Identifiable

private val outerControlActions: MutableList<ControlAction> = mutableListOf(),
innerControlActions: MutableList<ControlAction> = mutableListOf(),
buttonActions: MutableList<ButtonAction> = mutableListOf()
buttonActions: MutableList<ButtonAction> = mutableListOf(),
private val innerSearchSettings: SearchSettings? = null,
): OneDeepEntityPage<INNER>(
view,
innerClassType,
Expand Down Expand Up @@ -101,7 +102,7 @@ abstract class TwoDeepEntityPage<OUTER : IdentifiableEntity, INNER: Identifiable
ignoreFromMenu,

innerControlActions,
buttonActions
buttonActions,
) {

private val outerDescriptor = OverviewBuilder(outerClassType)
Expand Down Expand Up @@ -182,6 +183,7 @@ abstract class TwoDeepEntityPage<OUTER : IdentifiableEntity, INNER: Identifiable
model.addAttribute("controlActions", controlActions.filter { it.permission.validate(user) })
model.addAttribute("allControlActions", controlActions)
model.addAttribute("buttonActions", buttonActions.filter { it.permission.validate(user) })
model.addAttribute("searchSettings", innerSearchSettings)

attachPermissionInfo(model)

Expand Down
Loading