+
+
Index: addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.css
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.css (revision )
+++ addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.css (revision )
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2015 Hippo B.V. (http://www.onehippo.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+.resulttable {
+ width: 100%;}
+
+.resulttable th {
+ font-weight: bold;
+ border-bottom: 1px solid #333;
+}
+
+.resulttable th, .resulttable td {
+ color: #333;
+ padding: 8px 20px;
+ width: 50%;
+}
+
+.resulttable th.count, .resulttable td.count {
+ text-align: right;
+}
Index: addon-cms/pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- addon-cms/pom.xml (revision )
+++ addon-cms/pom.xml (revision )
@@ -0,0 +1,78 @@
+
+
+
+ 4.0.0
+
+ org.onehippo.cms7
+ hippo-plugin-poll
+ 1.09.00-SNAPSHOT
+
+
+ hippo-plugin-poll-addon-cms
+ Hippo Plugin Poll CMS
+
+
+
+
+ org.onehippo.cms7
+ hippo-cms-api
+
+
+
+ org.onehippo.cms7
+ hippo-cms-editor-frontend
+
+
+
+ org.onehippo.cms7
+ hippo-repository-api
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ true
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+
+
+ false
+ ${basedir}/src/main/java
+
+ **/*.properties
+ **/*.html
+ **/*.css
+ **/*.png
+ **/*.gif
+
+
+
+
+
Index: addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.java (revision )
+++ addon-cms/src/main/java/org/onehippo/forge/poll/cms/PollResultsPlugin.java (revision )
@@ -0,0 +1,251 @@
+/*
+ * Copyright 2015 Hippo B.V. (http://www.onehippo.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onehippo.forge.poll.cms;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.markup.head.CssHeaderItem;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Fragment;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.RefreshingView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.request.resource.CssResourceReference;
+import org.hippoecm.frontend.plugin.IPluginContext;
+import org.hippoecm.frontend.plugin.config.IPluginConfig;
+import org.hippoecm.frontend.service.render.RenderPlugin;
+import org.hippoecm.repository.api.HippoNodeType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Render class for the extra field in the poll document.
+ * Contains the logic to retrieve the number of votes for the current poll.
+ */
+public class PollResultsPlugin extends RenderPlugin