syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/5] git commit: Small improvement to Resources page
Date Fri, 31 Oct 2014 14:30:43 GMT
Small improvement to Resources page


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5d57fec8
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5d57fec8
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5d57fec8

Branch: refs/heads/master
Commit: 5d57fec8785c8a7cad25be64da5249ebbed95f9e
Parents: 6f309b6
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Oct 31 13:12:49 2014 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Oct 31 13:12:49 2014 +0100

----------------------------------------------------------------------
 .../apache/syncope/console/pages/Resources.java | 24 ++++++++++++++++++--
 .../apache/syncope/console/pages/Resources.html | 14 ++++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/5d57fec8/console/src/main/java/org/apache/syncope/console/pages/Resources.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/Resources.java b/console/src/main/java/org/apache/syncope/console/pages/Resources.java
index 24e5962..a18b898 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/Resources.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/Resources.java
@@ -38,6 +38,7 @@ import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLin
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
 import org.apache.syncope.console.wicket.markup.html.form.LinkPanel;
+import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -62,6 +63,7 @@ import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.model.AbstractReadOnlyModel;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.StringResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
@@ -224,8 +226,26 @@ public class Resources extends BasePage {
                     }
                 });
 
-        columns.add(new PropertyColumn<ResourceTO, String>(new StringResourceModel(
-                "propagationPrimary", this, null), "propagationPrimary", "propagationPrimary"));
+        columns.add(new AbstractColumn<ResourceTO, String>(
+                new StringResourceModel("propagationPrimary", this, null)) {
+
+                    private static final long serialVersionUID = -3503023501954863131L;
+
+                    @Override
+                    public void populateItem(final Item<ICellPopulator<ResourceTO>>
item,
+                            final String componentId, final IModel<ResourceTO> model)
{
+
+                        item.add(new Label(componentId, ""));
+                        item.add(new AttributeModifier("class", new Model<String>(
+                                                Boolean.toString(model.getObject().isPropagationPrimary()))));
+                    }
+
+                    @Override
+                    public String getCssClass() {
+                        return "small_fixedsize";
+                    }
+                });
+
         columns.add(new PropertyColumn<ResourceTO, String>(new StringResourceModel(
                 "propagationPriority", this, null), "propagationPriority", "propagationPriority"));
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/5d57fec8/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/Resources.html b/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
index d0513fe..e4d951c 100644
--- a/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
+++ b/console/src/main/resources/org/apache/syncope/console/pages/Resources.html
@@ -17,6 +17,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:head>
+    <style type="text/css">
+      .true {
+        background-image: url(../../img/ok.png);
+        background-position: center center;
+        background-repeat: no-repeat;
+        height: 18px;
+        width: 65px;
+      }
+      .false {
+        width: 65px;
+      }
+    </style>
+  </wicket:head>
   <wicket:extend>
 
     <div id="tabs">


Mime
View raw message