use of org.olat.course.reminder.model.ReminderRow in project OpenOLAT by OpenOLAT.
the class CourseReminderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addButton == source) {
doAddReminder(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
ReminderRow row = (ReminderRow) link.getUserObject();
doOpenTools(ureq, row, link);
}
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
ReminderRow row = tableModel.getObject(se.getIndex());
if ("edit".equals(cmd)) {
doEdit(ureq, row);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.course.reminder.model.ReminderRow in project OpenOLAT by OpenOLAT.
the class CourseReminderListController method updateModel.
private void updateModel() {
List<ReminderInfos> reminders = reminderManager.getReminderInfos(repositoryEntry);
List<ReminderRow> rows = new ArrayList<>(reminders.size());
for (ReminderInfos reminder : reminders) {
FormLink toolsLink = uifactory.addFormLink("tools_" + counter.incrementAndGet(), "tools", "", null, null, Link.NONTRANSLATED);
toolsLink.setIconLeftCSS("o_icon o_icon_actions o_icon-lg");
toolsLink.setElementCssClass("o_sel_course_reminder_tools");
toolsLink.setTitle(translate("tools"));
ReminderRow row = new ReminderRow(reminder, toolsLink);
toolsLink.setUserObject(row);
rows.add(row);
}
tableModel.setObjects(rows);
tableEl.reset();
tableEl.setVisible(rows.size() > 0);
}
use of org.olat.course.reminder.model.ReminderRow in project openolat by klemens.
the class CourseReminderListController method updateModel.
private void updateModel() {
List<ReminderInfos> reminders = reminderManager.getReminderInfos(repositoryEntry);
List<ReminderRow> rows = new ArrayList<>(reminders.size());
for (ReminderInfos reminder : reminders) {
FormLink toolsLink = uifactory.addFormLink("tools_" + counter.incrementAndGet(), "tools", "", null, null, Link.NONTRANSLATED);
toolsLink.setIconLeftCSS("o_icon o_icon_actions o_icon-lg");
toolsLink.setElementCssClass("o_sel_course_reminder_tools");
toolsLink.setTitle(translate("tools"));
ReminderRow row = new ReminderRow(reminder, toolsLink);
toolsLink.setUserObject(row);
rows.add(row);
}
tableModel.setObjects(rows);
tableEl.reset();
tableEl.setVisible(rows.size() > 0);
}
use of org.olat.course.reminder.model.ReminderRow in project openolat by klemens.
the class CourseReminderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addButton == source) {
doAddReminder(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
ReminderRow row = (ReminderRow) link.getUserObject();
doOpenTools(ureq, row, link);
}
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
ReminderRow row = tableModel.getObject(se.getIndex());
if ("edit".equals(cmd)) {
doEdit(ureq, row);
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations