Fehler im Benachrichtigungsforumlar behoben
Rechte-Fehler für den Theme-Tab korrigiert git-svn-id: https://svn.libreccm.org/ccm/trunk@1212 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b6b6b98a52
commit
2d18b5ad3e
|
|
@ -109,17 +109,17 @@ class ForumAlertsView extends SimpleContainer implements Constants {
|
||||||
ForumSubscription fSub =
|
ForumSubscription fSub =
|
||||||
ForumSubscription.getFromForum(forum);
|
ForumSubscription.getFromForum(forum);
|
||||||
if (fSub.isSubscribed(party)) {
|
if (fSub.isSubscribed(party)) {
|
||||||
instant.setValue(s,"Yes");
|
instant.setValue(s,Text.gzAsStr("forum.ui.yes"));
|
||||||
} else {
|
} else {
|
||||||
instant.setValue(s, "No");
|
instant.setValue(s, Text.gzAsStr("forum.ui.no"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DailySubscription dSub = (DailySubscription)
|
DailySubscription dSub = (DailySubscription)
|
||||||
DailySubscription.getFromForum(forum);
|
DailySubscription.getFromForum(forum);
|
||||||
if (dSub.isSubscribed(party)) {
|
if (dSub.isSubscribed(party)) {
|
||||||
daily.setValue(s,"Yes");
|
daily.setValue(s,Text.gzAsStr("forum.ui.yes"));
|
||||||
} else {
|
} else {
|
||||||
daily.setValue(s, "No");
|
daily.setValue(s, Text.gzAsStr("forum.ui.no"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -138,9 +138,9 @@ class ForumAlertsView extends SimpleContainer implements Constants {
|
||||||
DailySubscription dSub = (DailySubscription)
|
DailySubscription dSub = (DailySubscription)
|
||||||
DailySubscription.getFromForum(forum);
|
DailySubscription.getFromForum(forum);
|
||||||
|
|
||||||
if (data.get("instant").equals("Yes")) {
|
if (data.get("instant").equals(Text.gzAsStr("forum.ui.yes"))) {
|
||||||
fSub.subscribe(party);
|
fSub.subscribe(party);
|
||||||
} else if (data.get("instant").equals("No")) {
|
} else if (data.get("instant").equals(Text.gzAsStr("forum.ui.no"))) {
|
||||||
fSub.unsubscribe(party);
|
fSub.unsubscribe(party);
|
||||||
} else {
|
} else {
|
||||||
throw new FormProcessException(
|
throw new FormProcessException(
|
||||||
|
|
@ -149,9 +149,9 @@ class ForumAlertsView extends SimpleContainer implements Constants {
|
||||||
}
|
}
|
||||||
fSub.save();
|
fSub.save();
|
||||||
|
|
||||||
if (data.get("daily").equals("Yes")) {
|
if (data.get("daily").equals(Text.gzAsStr("forum.ui.yes"))) {
|
||||||
dSub.subscribe(party);
|
dSub.subscribe(party);
|
||||||
} else if (data.get("daily").equals("No")) {
|
} else if (data.get("daily").equals(Text.gzAsStr("forum.ui.no"))) {
|
||||||
dSub.unsubscribe(party);
|
dSub.unsubscribe(party);
|
||||||
} else {
|
} else {
|
||||||
throw new FormProcessException(
|
throw new FormProcessException(
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,6 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
UserContext.redirectToLoginPage(state.getRequest());
|
UserContext.redirectToLoginPage(state.getRequest());
|
||||||
}
|
}
|
||||||
PermissionService.assertPermission(forumAdmin);
|
PermissionService.assertPermission(forumAdmin);
|
||||||
|
|
||||||
setVisibleComponent(state, m_permissionsView);
|
setVisibleComponent(state, m_permissionsView);
|
||||||
} else if (MODE_SETUP.equals(mode)) {
|
} else if (MODE_SETUP.equals(mode)) {
|
||||||
if (party == null) {
|
if (party == null) {
|
||||||
|
|
@ -202,7 +201,9 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
PermissionService.assertPermission(forumAdmin);
|
PermissionService.assertPermission(forumAdmin);
|
||||||
setVisibleComponent(state, m_setupView);
|
setVisibleComponent(state, m_setupView);
|
||||||
} else if (MODE_THREADS.equals(mode)) {
|
} else if (MODE_THREADS.equals(mode)) {
|
||||||
PermissionService.assertPermission(forumAdmin);
|
if (party == null) {
|
||||||
|
UserContext.redirectToLoginPage(state.getRequest());
|
||||||
|
}
|
||||||
setVisibleComponent(state, m_threadsView);
|
setVisibleComponent(state, m_threadsView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -247,7 +248,7 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
protected void generateModes(PageState state, Element content,
|
protected void generateModes(PageState state, Element content,
|
||||||
Party party, Forum forum) {
|
Party party, Forum forum) {
|
||||||
|
|
||||||
PermissionDescriptor permission = new PermissionDescriptor(
|
PermissionDescriptor adminPermission = new PermissionDescriptor(
|
||||||
PrivilegeDescriptor.ADMIN,
|
PrivilegeDescriptor.ADMIN,
|
||||||
forum,
|
forum,
|
||||||
party);
|
party);
|
||||||
|
|
@ -269,7 +270,7 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
Text.gz("forum.ui.modeThreads"));
|
Text.gz("forum.ui.modeThreads"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// topics panel is always shoen as well if not restricted to admins.
|
// topics panel is always shown as well if not restricted to admins.
|
||||||
if (!Forum.getConfig().topicCreationByAdminOnly()) {
|
if (!Forum.getConfig().topicCreationByAdminOnly()) {
|
||||||
generateModeXML(state, content, MODE_TOPICS,
|
generateModeXML(state, content, MODE_TOPICS,
|
||||||
Text.gz("forum.ui.modeTopics"));
|
Text.gz("forum.ui.modeTopics"));
|
||||||
|
|
@ -279,7 +280,7 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
Text.gz("forum.ui.modeAlerts"));
|
Text.gz("forum.ui.modeAlerts"));
|
||||||
|
|
||||||
// admin section
|
// admin section
|
||||||
if (PermissionService.checkPermission(permission)) {
|
if (PermissionService.checkPermission(adminPermission)) {
|
||||||
generateModeXML(state, content, MODE_MODERATION,
|
generateModeXML(state, content, MODE_MODERATION,
|
||||||
Text.gz("forum.ui.modeAlerts"));
|
Text.gz("forum.ui.modeAlerts"));
|
||||||
if (Forum.getConfig().showNewTabs()) {
|
if (Forum.getConfig().showNewTabs()) {
|
||||||
|
|
@ -313,31 +314,6 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
|
||||||
Element parent,
|
Element parent,
|
||||||
String mode) {
|
String mode) {
|
||||||
generateModeXML(state, parent, mode, null);
|
generateModeXML(state, parent, mode, null);
|
||||||
/*
|
|
||||||
String current = (String)state.getValue(m_mode);
|
|
||||||
if (current == null) {
|
|
||||||
current = MODE_THREADS; // used as default mode
|
|
||||||
}
|
|
||||||
|
|
||||||
Element content =
|
|
||||||
parent.newChildElement(FORUM_XML_PREFIX + ":forumMode", FORUM_XML_NS);
|
|
||||||
|
|
||||||
state.setControlEvent(this, "mode", mode);
|
|
||||||
|
|
||||||
content.addAttribute("mode",
|
|
||||||
mode);
|
|
||||||
|
|
||||||
try {
|
|
||||||
content.addAttribute("url",
|
|
||||||
state.stateAsURL());
|
|
||||||
} catch (IOException ex) {
|
|
||||||
throw new UncheckedWrapperException("cannot create url", ex);
|
|
||||||
}
|
|
||||||
content.addAttribute("selected",
|
|
||||||
current.equals(mode) ? "1" : "0");
|
|
||||||
state.clearControlEvent();
|
|
||||||
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue