Skip to content
Snippets Groups Projects
Commit 06b2790c authored by User expired's avatar User expired
Browse files

openolat#50: as closing a course does not happen in the lifecycle page...

openolat#50: as closing a course does not happen in the lifecycle page anymore, it does only make sense to show this link when the delete managed flag is not set
parent c24355e2
No related branches found
No related tags found
No related merge requests found
...@@ -628,24 +628,12 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im ...@@ -628,24 +628,12 @@ public class CourseRuntimeController extends RepositoryEntryRuntimeController im
settingsDropdown.addComponent(new Spacer("close-delete")); settingsDropdown.addComponent(new Spacer("close-delete"));
} }
if(!closeManged || !deleteManaged) { if(!deleteManaged) {
// If a resource is closable (currently only course) and // If a course is deletable we offer this
// deletable (currently all resources) we offer those two // action in a separate page, unless it is a managed operation.
// actions in a separate page, unless both are managed // In that case we don't show anything at all.
// operations. In that case we don't show anything at all.
// If only one of the two actions are managed, we go to the
// separate page as well and show only the relevant action
// there.
lifeCycleChangeLink = LinkFactory.createToolLink("lifeCycleChange", translate("details.lifecycle.change"), this, "o_icon o_icon-fw o_icon_lifecycle"); lifeCycleChangeLink = LinkFactory.createToolLink("lifeCycleChange", translate("details.lifecycle.change"), this, "o_icon o_icon-fw o_icon_lifecycle");
settingsDropdown.addComponent(lifeCycleChangeLink); settingsDropdown.addComponent(lifeCycleChangeLink);
} else {
if(!deleteManaged) {
String type = translate(handler.getSupportedType());
String deleteTitle = translate("details.delete.alt", new String[]{ type });
deleteLink = LinkFactory.createToolLink("delete", deleteTitle, this, "o_icon o_icon-fw o_icon_delete_item");
deleteLink.setElementCssClass("o_sel_repo_close");
settingsDropdown.addComponent(deleteLink);
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment