1. Sean Flanigan
  2. zanata

Commits

Sean Flanigan  committed cec5e82 Merge

-- Merged

  • Participants
  • Parent commits 1e777e4, 6ee8b87
  • Branches default

Comments (0)

Files changed (31)

File server/flies-model/src/main/java/net/openl10n/flies/model/HProject.java

View file
    private String name;
    private String description;
    private String homeContent;
-   private Boolean overrideLocales;
+   private Boolean overrideLocales = false;
    private Set<HLocale> customizedLocales;
 
    private Set<HPerson> maintainers;

File server/flies-model/src/main/java/net/openl10n/flies/model/HProjectIteration.java

View file
    private Map<String, HDocument> documents;
    private Map<String, HDocument> allDocuments;
 
-   private Boolean overrideLocales;
+   private Boolean overrideLocales = false;
    private Set<HLocale> customizedLocales;
 
 

File server/flies-war/src/main/java/net/openl10n/flies/ApplicationConfiguration.java

View file
 
    private void setDefaults(Map<String, String> map)
    {
-      map.put(HApplicationConfiguration.KEY_HELP, "http://code.google.com/p/flies/wiki/Introduction");
       map.put(HApplicationConfiguration.KEY_REGISTER, "/flies/account/register");
       map.put(HApplicationConfiguration.KEY_HOST, "http://localhost:8080/flies");
       map.put(HApplicationConfiguration.KEY_DOMAIN, "example.com");
       map.put(HApplicationConfiguration.KEY_ADMIN_EMAIL, "no-reply@redhat.com");
    }
 
-   public String getHelpPath()
-   {
-      return configValues.get(HApplicationConfiguration.KEY_HELP);
-   }
-
    public String getRegisterPath()
    {
       return configValues.get(HApplicationConfiguration.KEY_REGISTER);

File server/flies-war/src/main/java/net/openl10n/flies/action/IterationLocaleManageAction.java

-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package net.openl10n.flies.action;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import net.openl10n.flies.common.LocaleId;
-import net.openl10n.flies.dao.ProjectDAO;
-import net.openl10n.flies.dao.ProjectIterationDAO;
-import net.openl10n.flies.model.HLocale;
-import net.openl10n.flies.model.HProject;
-import net.openl10n.flies.model.HProjectIteration;
-import net.openl10n.flies.service.LocaleService;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-import org.jboss.seam.log.Log;
-
-@Name("iterationLocaleManageAction")
-@Scope(ScopeType.PAGE)
-public class IterationLocaleManageAction implements Serializable
-{
-   private static final long serialVersionUID = 1L;
-   @DataModel
-   Set<HLocale> customizedLocales;
-   @DataModelSelection
-   HLocale selectedLocale;
-
-   private String iterationSlug;
-   private String projectSlug;
-
-   private HProjectIteration iteration;
-
-   @In
-   ProjectIterationDAO projectIterationDAO;
-
-   @In
-   ProjectDAO projectDAO;
-
-   @In
-   LocaleService localeServiceImpl;
-   @Logger
-   Log log;
-
-   public void loadCustomizedLocales()
-   {
-      iteration = projectIterationDAO.getBySlug(this.projectSlug, this.iterationSlug);
-      customizedLocales = iteration.getCustomizedLocales();
-   }
-
-   public HProjectIteration getProjectIteration()
-   {
-      return this.iteration;
-   }
-
-   public void setProjectIteration(HProjectIteration var)
-   {
-      this.iteration = var;
-   }
-
-   public HProject getProject()
-   {
-      return projectDAO.getBySlug(projectSlug);
-   }
-
-   public HLocale getSelectedLocale()
-   {
-      return this.selectedLocale;
-   }
-
-   public void deleteLocale(HLocale locale)
-   {
-      iteration = projectIterationDAO.getBySlug(this.projectSlug, this.iterationSlug);
-      customizedLocales = iteration.getCustomizedLocales();
-      customizedLocales.remove(locale);
-      projectIterationDAO.makePersistent(iteration);
-      projectIterationDAO.flush();
-   }
-
-   public String addLocale(String locale)
-   {
-      iteration = projectIterationDAO.getBySlug(this.projectSlug, this.iterationSlug);
-      customizedLocales = iteration.getCustomizedLocales();
-      LocaleId localeId = new LocaleId(locale);
-      HLocale hLocale = localeServiceImpl.getByLocaleId(localeId);
-      if (hLocale != null)
-      {
-         customizedLocales.add(hLocale);
-         projectIterationDAO.makePersistent(iteration);
-         projectIterationDAO.flush();
-      }
-      return "success";
-   }
-
-   public void setProjectSlug(String slug)
-   {
-      this.projectSlug = slug;
-   }
-
-   public String getProjectSlug()
-   {
-      return this.projectSlug;
-   }
-
-   public void setIterationSlug(String slug)
-   {
-      this.iterationSlug = slug;
-   }
-
-   public String getIterationSlug()
-   {
-      return this.iterationSlug;
-   }
-
-   public String cancel()
-   {
-      return "cancel";
-   }
-
-}

File server/flies-war/src/main/java/net/openl10n/flies/action/LocaleListAction.java

View file
+/*
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package net.openl10n.flies.action;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+
+import net.openl10n.flies.dao.ProjectDAO;
+import net.openl10n.flies.model.HProject;
+import net.openl10n.flies.service.LocaleService;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("localeListAction")
+@Scope(ScopeType.PAGE)
+public class LocaleListAction implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+   private List<String> customizedLocales = new ArrayList<String>();
+   private List<String> availableList = new ArrayList<String>();
+   private Map<String, String> globalItems;
+   private Map<String, String> availableItems;
+   @Out(required = false)
+   private Map<String, String> customizedItems;
+   @Out(required = false)
+   private Boolean overrideLocales;
+   private boolean setting;
+   @Logger
+   Log log;
+   @In
+   ProjectDAO projectDAO;
+
+   private String slug;
+
+   @In
+   LocaleService localeServiceImpl;
+
+   public void toCustomizedLocales()
+   {
+      if (!availableList.isEmpty())
+      {
+         for (String op : availableList)
+         {
+            customizedItems.put(op, op);
+            availableItems.remove(op);
+         }
+      }
+   }
+
+   public void removeFromCustomizedLocales()
+   {
+      if (!customizedLocales.isEmpty())
+      {
+         for (String op : customizedLocales)
+         {
+            customizedItems.remove(op);
+            availableItems.put(op, op);
+         }
+      }
+
+   }
+
+   public List<String> getCustomizedLocales()
+   {
+      return customizedLocales;
+   }
+
+   public void setCustomizedLocales(List<String> var)
+   {
+      customizedLocales = var;
+   }
+
+   public List<String> getAvailableList()
+   {
+      return availableList;
+   }
+
+   public void setAvailableList(List<String> var)
+   {
+      availableList = var;
+   }
+
+   public Map<String, String> getCustomizedItems()
+   {
+      return customizedItems;
+   }
+   
+   @Factory("availableItems")
+   public Map<String, String> loadItems()
+   {
+      availableItems = new TreeMap<String, String>();
+      log.debug("loadProjectItems");
+      customizedItems = localeServiceImpl.getCustomizedLocalesItems(slug);
+      if (customizedItems.isEmpty())
+      {
+         customizedItems = globalItems;
+      }
+      else
+      {
+         for (String op : globalItems.keySet())
+         {
+            if (!customizedItems.containsKey(op))
+            {
+               availableItems.put(op, op);
+            }
+         }
+      }
+      return availableItems;
+   }
+
+
+   @Create
+   public void loadGlobalItems()
+   {
+      globalItems = localeServiceImpl.getGlobalLocaleItems();
+   }
+
+   public String getSlug()
+   {
+      return slug;
+   }
+
+   public void setSlug(String slug)
+   {
+      this.slug = slug;
+   }
+
+   public void setSetting(boolean var)
+   {
+      setting = var;
+      overrideLocales = new Boolean(setting);
+   }
+
+   public boolean getSetting()
+   {
+      if (overrideLocales == null)
+      {
+         if (slug == null || slug.isEmpty())
+         {
+            setting = false;
+         }
+         else
+         {
+            HProject project = projectDAO.getBySlug(slug);
+            setting = project.getOverrideLocales();
+         }
+         overrideLocales = new Boolean(setting);
+      }
+      return setting;
+   }
+
+}

File server/flies-war/src/main/java/net/openl10n/flies/action/ProjectHome.java

View file
 package net.openl10n.flies.action;
 
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import javax.faces.event.ValueChangeEvent;
 import javax.persistence.NoResultException;
 
 import net.openl10n.flies.model.HAccount;
 import net.openl10n.flies.model.HIterationProject;
+import net.openl10n.flies.model.HLocale;
 import net.openl10n.flies.model.HPerson;
 import net.openl10n.flies.model.HProjectIteration;
+import net.openl10n.flies.service.LocaleService;
 
 import org.hibernate.Session;
 import org.hibernate.criterion.NaturalIdentifier;
 @Name("projectHome")
 public class ProjectHome extends SlugHome<HIterationProject>
 {
-
-   /**
-    * 
-    */
    private static final long serialVersionUID = 1L;
 
    private String slug;
 
    @In(required = false, value = JpaIdentityStore.AUTHENTICATED_USER)
    HAccount authenticatedAccount;
+   @In(required = false)
+   Map<String, String> customizedItems;
+   @In(required = false)
+   private Boolean overrideLocales;
+   @In
+   LocaleService localeServiceImpl;
 
    @Override
    protected HIterationProject loadInstance()
       if (!validateSlug(getInstance().getSlug(), "slug"))
          return null;
 
+      getInstance().setOverrideLocales(overrideLocales);
+      if (customizedItems != null && overrideLocales != null && overrideLocales.booleanValue())
+      {
+         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(customizedItems);
+         getInstance().getCustomizedLocales().clear();
+         getInstance().getCustomizedLocales().addAll(locale);
+      }
+
       if (authenticatedAccount != null)
       {
          HPerson currentPerson = getEntityManager().find(HPerson.class, authenticatedAccount.getPerson().getId());
       return slug;
    }
 
+   @Override
+   public String update()
+   {
+      getInstance().setOverrideLocales(overrideLocales);
+      if (customizedItems != null && overrideLocales != null && overrideLocales.booleanValue())
+      {
+         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(customizedItems);
+         getInstance().getCustomizedLocales().clear();
+         getInstance().getCustomizedLocales().addAll(locale);
+      }
+      return super.update();
+   }
+
 }

File server/flies-war/src/main/java/net/openl10n/flies/action/ProjectIterationHome.java

View file
+/*
+ * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
+ * @author tags. See the copyright.txt file in the distribution for a full
+ * listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
 package net.openl10n.flies.action;
 
+import java.util.Map;
+import java.util.Set;
+
 import javax.faces.event.ValueChangeEvent;
 import javax.persistence.EntityNotFoundException;
 import javax.persistence.NoResultException;
 
 import net.openl10n.flies.dao.ProjectDAO;
 import net.openl10n.flies.model.HIterationProject;
+import net.openl10n.flies.model.HLocale;
 import net.openl10n.flies.model.HProjectIteration;
+import net.openl10n.flies.service.LocaleService;
 
 import org.hibernate.criterion.NaturalIdentifier;
 import org.hibernate.criterion.Restrictions;
 public class ProjectIterationHome extends SlugHome<HProjectIteration>
 {
 
+   private static final long serialVersionUID = 1L;
    private String slug;
    private String projectSlug;
+   @In(required = false)
+   Map<String, String> iterationCustomizedItems;
+   @In(required = false)
+   private Boolean iterationOverrideLocales;
+   @In
+   LocaleService localeServiceImpl;
 
    @Logger
    Log log;
    {
       if (!validateSlug(getInstance().getSlug(), "slug"))
          return null;
+
+      getInstance().setOverrideLocales(iterationOverrideLocales);
+      if (iterationCustomizedItems != null && iterationOverrideLocales != null && iterationOverrideLocales.booleanValue())
+      {
+         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(iterationCustomizedItems);
+         getInstance().getCustomizedLocales().clear();
+         getInstance().getCustomizedLocales().addAll(locale);
+      }
+
       return super.persist();
    }
 
       return slug != null && projectSlug != null;
    }
 
+   @Override
+   public String update()
+   {
+      getInstance().setOverrideLocales(iterationOverrideLocales);
+      if (iterationCustomizedItems != null && iterationOverrideLocales != null && iterationOverrideLocales.booleanValue())
+      {
+         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(iterationCustomizedItems);
+         getInstance().getCustomizedLocales().clear();
+         getInstance().getCustomizedLocales().addAll(locale);
+      }
+      return super.update();
+   }
+
 }

File server/flies-war/src/main/java/net/openl10n/flies/action/ProjectIterationLocaleAction.java

View file
+/*
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package net.openl10n.flies.action;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import net.openl10n.flies.dao.ProjectIterationDAO;
+import net.openl10n.flies.model.HProjectIteration;
+import net.openl10n.flies.service.LocaleService;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("projectIterationLocaleAction")
+@Scope(ScopeType.PAGE)
+public class ProjectIterationLocaleAction implements Serializable
+{
+
+   private static final long serialVersionUID = 1L;
+   private List<String> customizedLocales = new ArrayList<String>();
+   private List<String> availableList = new ArrayList<String>();
+   private Map<String, String> globalItems;
+   private Map<String, String> availableItems;
+   @Out(required = false)
+   private Map<String, String> iterationCustomizedItems;
+   @Out(required = false)
+   private Boolean iterationOverrideLocales;
+   private boolean setting;
+   @Logger
+   Log log;
+   @In
+   ProjectIterationDAO projectIterationDAO;
+
+   private String projectSlug;
+
+   private String iterationSlug;
+
+   @In
+   LocaleService localeServiceImpl;
+
+   public void toCustomizedLocales()
+   {
+      if (!availableList.isEmpty())
+      {
+         for (String op : availableList)
+         {
+            iterationCustomizedItems.put(op, op);
+            availableItems.remove(op);
+         }
+      }
+   }
+
+   public void removeFromCustomizedLocales()
+   {
+      if (!customizedLocales.isEmpty())
+      {
+         for (String op : customizedLocales)
+         {
+            iterationCustomizedItems.remove(op);
+            availableItems.put(op, op);
+         }
+      }
+
+   }
+
+   public List<String> getCustomizedLocales()
+   {
+      return customizedLocales;
+   }
+
+   public void setCustomizedLocales(List<String> var)
+   {
+      customizedLocales = var;
+   }
+
+   public List<String> getAvailableList()
+   {
+      return availableList;
+   }
+
+   public void setAvailableList(List<String> var)
+   {
+      availableList = var;
+   }
+
+   public Map<String, String> getIterationCustomizedItems()
+   {
+      return iterationCustomizedItems;
+   }
+
+   @Factory("iterationAvailableItems")
+   public Map<String, String> loadItems()
+   {
+      log.debug("load iterationCustomizedItems");
+      availableItems = new TreeMap<String, String>();
+      iterationCustomizedItems = localeServiceImpl.getIterationCustomizedLocalesItems(projectSlug, iterationSlug);
+      globalItems = localeServiceImpl.getIterationGlobalLocaleItems(projectSlug);
+      if (iterationCustomizedItems.isEmpty())
+      {
+         iterationCustomizedItems = globalItems;
+      }
+      else
+      {
+         for (String op : globalItems.keySet())
+         {
+            if (!iterationCustomizedItems.containsKey(op))
+            {
+               availableItems.put(op, op);
+            }
+         }
+      }
+      return availableItems;
+   }
+
+   public String getProjectSlug()
+   {
+      return projectSlug;
+   }
+
+   public void setProjectSlug(String projectSlug)
+   {
+      this.projectSlug = projectSlug;
+   }
+
+   public String getIterationSlug()
+   {
+      return iterationSlug;
+   }
+
+   public void setIterationSlug(String iterationSlug)
+   {
+      this.iterationSlug = iterationSlug;
+   }
+
+   public void setSetting(boolean var)
+   {
+      setting = var;
+      iterationOverrideLocales = new Boolean(setting);
+   }
+
+   public boolean getSetting()
+   {
+      if (iterationOverrideLocales == null)
+      {
+         if (projectSlug == null || iterationSlug == null)
+         {
+            setting = false;
+         }
+         else
+         {
+            HProjectIteration project = projectIterationDAO.getBySlug(projectSlug, iterationSlug);
+            setting = project.getOverrideLocales();
+         }
+         iterationOverrideLocales = new Boolean(setting);
+      }
+      return setting;
+   }
+
+}

File server/flies-war/src/main/java/net/openl10n/flies/action/ProjectLocaleDetailAction.java

-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package net.openl10n.flies.action;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.model.SelectItem;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-import com.ibm.icu.util.ULocale;
-
-import net.openl10n.flies.model.HLocale;
-import net.openl10n.flies.service.LocaleService;
-
-@Name("projectLocaleDetailAction")
-@Scope(ScopeType.PAGE)
-public class ProjectLocaleDetailAction implements Serializable
-{
-   private static final long serialVersionUID = 1L;
-   @In
-   private LocaleService localeServiceImpl;
-   private String language;
-   private ULocale uLocale;
-   private List<SelectItem> localeStringList;
-
-   @Create
-   public void onCreate()
-   {
-      fetchLocaleFromSupportedLanguage();
-   }
-
-   public String getLanguage()
-   {
-      return language;
-   }
-
-   public ULocale getuLocale()
-   {
-      return uLocale;
-   }
-
-   public void setuLocale(ULocale uLocale)
-   {
-      this.uLocale = uLocale;
-   }
-
-   public void setLanguage(String language)
-   {
-      this.language = language;
-   }
-
-   public void updateLanguage()
-   {
-      this.uLocale = new ULocale(this.language);
-   }
-
-   public void fetchLocaleFromSupportedLanguage()
-   {
-      List<HLocale> locale = localeServiceImpl.getSupportedLocales();
-      List<SelectItem> localeList = new ArrayList<SelectItem>();
-      for (HLocale var : locale)
-      {
-         SelectItem op = new SelectItem(var.getLocaleId().getId(), var.getLocaleId().getId());
-         localeList.add(op);
-      }
-      localeStringList = localeList;
-   }
-
-   public List<SelectItem> getLocaleStringList()
-   {
-      return localeStringList;
-   }
-
-}

File server/flies-war/src/main/java/net/openl10n/flies/action/ProjectLocaleManageAction.java

-/*
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package net.openl10n.flies.action;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import net.openl10n.flies.common.LocaleId;
-import net.openl10n.flies.dao.ProjectDAO;
-import net.openl10n.flies.model.HLocale;
-import net.openl10n.flies.model.HProject;
-import net.openl10n.flies.service.LocaleService;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
-import org.jboss.seam.annotations.datamodel.DataModelSelection;
-import org.jboss.seam.log.Log;
-
-@Name("projectLocaleManageAction")
-@Scope(ScopeType.PAGE)
-public class ProjectLocaleManageAction implements Serializable
-{
-   private static final long serialVersionUID = 1L;
-   @DataModel
-   Set<HLocale> customizedLocales;
-   @DataModelSelection
-   HLocale selectedLocale;
-
-   private String projectSlug;
-   private HProject project;
-
-   @In
-   ProjectDAO projectDAO;
-   @In
-   LocaleService localeServiceImpl;
-   @Logger
-   Log log;
-
-
-   public void loadCustomizedLocales()
-   {
-      project = projectDAO.getBySlug(this.projectSlug);
-      customizedLocales = project.getCustomizedLocales();
-   }
-
-   public HProject getProject()
-   {
-      if (project == null)
-      {
-         project = projectDAO.getBySlug(this.projectSlug);
-      }
-      return this.project;
-   }
-
-   public void setProject(HProject var)
-   {
-      this.project = var;
-   }
-
-   public HLocale getSelectedLocale()
-   {
-      return this.selectedLocale;
-   }
-
-   public void deleteLocale(HLocale locale)
-   {
-      customizedLocales.remove(locale);
-      projectDAO.makePersistent(project);
-      projectDAO.flush();
-   }
-
-   public String addLocale(String locale)
-   {
-      project = projectDAO.getBySlug(this.projectSlug);
-      customizedLocales = project.getCustomizedLocales();
-      LocaleId localeId =new LocaleId(locale);
-      HLocale hLocale = localeServiceImpl.getByLocaleId(localeId);
-      if(hLocale != null){
-         customizedLocales.add(hLocale);
-         projectDAO.makePersistent(project);
-         projectDAO.flush();
-      }
-      return "success";
-   }
-
-   public void setProjectSlug(String slug)
-   {
-      this.projectSlug = slug;
-   }
-
-   public String getProjectSlug()
-   {
-      return this.projectSlug;
-   }
-
-   public String cancel()
-   {
-      return "cancel";
-   }
-
-
-}

File server/flies-war/src/main/java/net/openl10n/flies/action/ServerConfigurationBean.java

View file
 import net.openl10n.flies.ApplicationConfiguration;
 import net.openl10n.flies.dao.ApplicationConfigurationDAO;
 import net.openl10n.flies.model.HApplicationConfiguration;
-import net.openl10n.flies.model.validator.Url;
 import net.openl10n.flies.model.validator.UrlNoSlash;
 
 import org.hibernate.validator.Email;
    @In
    ApplicationConfigurationDAO applicationConfigurationDAO;
 
-   private String helpUrl;
    private String registerUrl;
    private String serverUrl;
    private String emailDomain;
       return "/help/view.xhtml";
    }
 
-   @Url
-   public String getHelpUrl()
-   {
-      return helpUrl;
-   }
-
-   public void setHelpUrl(String helpUrl)
-   {
-      this.helpUrl = helpUrl;
-   }
 
    public String getRegisterUrl()
    {
    @Create
    public void onCreate()
    {
-      HApplicationConfiguration helpUrlValue = applicationConfigurationDAO.findByKey(HApplicationConfiguration.KEY_HELP);
-      if (helpUrlValue != null)
-      {
-         this.helpUrl = helpUrlValue.getValue();
-      }
       HApplicationConfiguration registerUrlValue = applicationConfigurationDAO.findByKey(HApplicationConfiguration.KEY_REGISTER);
       if (registerUrlValue != null)
       {
    @Transactional
    public void update()
    {
-      HApplicationConfiguration helpUrlValue = applicationConfigurationDAO.findByKey(HApplicationConfiguration.KEY_HELP);
-      if (helpUrlValue != null)
-      {
-         if (helpUrl == null || helpUrl.isEmpty())
-         {
-            applicationConfigurationDAO.makeTransient(helpUrlValue);
-         }
-         else
-         {
-            helpUrlValue.setValue(helpUrl);
-         }
-      }
-      else if (helpUrl != null && !helpUrl.isEmpty())
-      {
-         helpUrlValue = new HApplicationConfiguration(HApplicationConfiguration.KEY_HELP, helpUrl);
-         applicationConfigurationDAO.makePersistent(helpUrlValue);
-      }
-
       HApplicationConfiguration registerUrlValue = applicationConfigurationDAO.findByKey(HApplicationConfiguration.KEY_REGISTER);
       if (registerUrlValue != null)
       {

File server/flies-war/src/main/java/net/openl10n/flies/action/SlugHome.java

View file
+/*
+ * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
+ * @author tags. See the copyright.txt file in the distribution for a full
+ * listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
 package net.openl10n.flies.action;
 
 import org.hibernate.Session;
 public abstract class SlugHome<E> extends EntityHome<E>
 {
 
-   private static final long serialVersionUID = -992545184963409194L;
+   private static final long serialVersionUID = 1L;
 
+   @SuppressWarnings("unchecked")
    @Override
    protected E loadInstance()
    {

File server/flies-war/src/main/java/net/openl10n/flies/action/ViewAllStatusAction.java

View file
  */
 package net.openl10n.flies.action;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
 @Name("viewAllStatusAction")
 @Scope(ScopeType.PAGE)
-public class ViewAllStatusAction
+public class ViewAllStatusAction implements Serializable
 {
    private static final long serialVersionUID = 1L;
    @Logger
          }
          else
          {
-            per = (int) (100 * words.getApproved() / words.getTotal());
+            per = (int) Math.ceil(100 * words.getApproved() / words.getTotal());
 
          }
          Status op = new Status(var.getLocaleId().getId(), var.retrieveNativeName(), words, per);

File server/flies-war/src/main/java/net/openl10n/flies/service/LocaleService.java

View file
 package net.openl10n.flies.service;
 
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import net.openl10n.flies.common.LocaleId;
 import net.openl10n.flies.exception.FliesServiceException;
    List<HLocale> getTranslation(String project, String iterationSlug, String username);
 
    List<HLocale> getSupportedLangugeByProjectIteration(String project, String iterationSlug);
+
+   Map<String, String> getGlobalLocaleItems();
+
+   Map<String, String> getCustomizedLocalesItems(String project);
+   
+   Set<HLocale> convertCustomizedLocale(Map<String, String> var);
+   
+   Map<String, String> getIterationCustomizedLocalesItems(String projectSlug, String iterationSlug);
+   
+   Map<String, String> getIterationGlobalLocaleItems(String projectSlug);
 }

File server/flies-war/src/main/java/net/openl10n/flies/service/impl/LocaleServiceImpl.java

View file
 package net.openl10n.flies.service.impl;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
 
 import net.openl10n.flies.common.LocaleId;
 import net.openl10n.flies.dao.LocaleDAO;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.annotations.AutoCreate;
 import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
 
 import com.ibm.icu.util.ULocale;
 
    private ProjectIterationDAO projectIterationDAO;
 
    private PersonDAO personDAO;
+   @Logger
+   Log log;
 
    @In
    public void setLocaleDAO(LocaleDAO localeDAO)
       return member;
    }
 
+   private String getDescript(HLocale op)
+   {
+      return op.retrieveDisplayName() + " [" + op.getLocaleId().getId() + "] " + op.retrieveNativeName();
+   }
+
+   @Override
+   public Map<String, String> getGlobalLocaleItems()
+   {
+      Map<String, String> globalItems = new TreeMap<String, String>();
+      List<HLocale> locale = getSupportedLocales();
+      for (HLocale op : locale)
+      {
+         String name = getDescript(op);
+         globalItems.put(name, name);
+      }
+      return globalItems;
+   }
+
+   @Override
+   public Map<String, String> getIterationGlobalLocaleItems(String projectSlug)
+   {
+      log.info("start getIterationGlobalLocaleItems for:" + projectSlug);
+      HProject project = projectDAO.getBySlug(projectSlug);
+      return project.getOverrideLocales() ? getCustomizedLocalesItems(projectSlug) : getGlobalLocaleItems();
+   }
+
+   @Override
+   public Map<String, String> getCustomizedLocalesItems(String projectSlug)
+   {
+      Map<String, String> customizedItems = new TreeMap<String, String>();
+      HProject project = projectDAO.getBySlug(projectSlug);
+      if (project != null && project.getOverrideLocales())
+      {
+         Set<HLocale> locales = project.getCustomizedLocales();
+         for (HLocale op : locales)
+         {
+            String name = getDescript(op);
+            customizedItems.put(name, name);
+         }
+      }
+      return customizedItems;
+   }
+
+   @Override
+   public Map<String, String> getIterationCustomizedLocalesItems(String projectSlug, String iterationSlug)
+   {
+      Map<String, String> customizedItems = new TreeMap<String, String>();
+      HProjectIteration iteration = projectIterationDAO.getBySlug(projectSlug, iterationSlug);
+      if (iteration != null && iteration.getOverrideLocales())
+      {
+         Set<HLocale> locales = iteration.getCustomizedLocales();
+         for (HLocale op : locales)
+         {
+            String name = getDescript(op);
+            customizedItems.put(name, name);
+         }
+      }
+      return customizedItems;
+   }
+
+   @Override
+   public Set<HLocale> convertCustomizedLocale(Map<String, String> var)
+   {
+      Set<HLocale> result = new HashSet<HLocale>();
+      for (String op : var.keySet())
+      {
+         String[] list = op.split("\\[");
+         String seVar = list[1].split("\\]")[0];
+         HLocale entity = localeDAO.findByLocaleId(new LocaleId(seVar));
+         result.add(entity);
+      }
+      return result;
+   }
 }

File server/flies-war/src/main/resources/messages.properties

View file
 jsf.AreYouSureYouWishToDeleteThisUserThisActionCannotBeUndone=Are you sure you wish to delete this user? This action cannot be undone.
 jsf.AreYouSureYouWishToDeleteThisLanguageThisActionCannotBeUndone=Are you sure you wish to delete this language? This action cannot be undone.
 jsf.AreYouSureYouWishToDeleteThisPersonThisActionCannotBeUndone=Are you sure you wish to remove this person as project maintainer?
+jsf.AvailableLocales=Available Locales
 jsf.Cancel=Cancel
 jsf.ChangePassword=Change Password
 jsf.Close=Close
 jsf.RunningVersionInfo=Running version #{fliesInit.version} (#{fliesInit.buildTimestamp}).
 jsf.Save=Save
 jsf.Search=Search
+jsf.SelectedLocales=Selected Locales
 jsf.ServerConfiguration=Server Configuration
 jsf.ServerUrl=Server URL
 jsf.Script=Script

File server/flies-war/src/main/webapp/WEB-INF/layout/iteration_edit_form.xhtml

View file
 
     </rich:panel>
 
-	<div>
+	<s:div>
+		<a4j:region>
 		<h:selectBooleanCheckbox
 		 title="overrideLocales"
-		  value="#{projectIterationHome.instance.overrideLocales}" >
+		  value="#{projectIterationLocaleAction.setting}" >
+			<a4j:support event="onchange" reRender="languagelist" />
 		</h:selectBooleanCheckbox>
+		</a4j:region>
 		<h:outputText
 		  value="Would you like add a customized list of locales?"/>
-	</div>
+	</s:div>
+
+
+	<s:div id="languagelist">
+	<rich:spacer height="20px" />
+	<a4j:region renderRegionOnly="true">
+      	<h:panelGrid columns="3" id ="languagePanel" rendered="#{projectIterationLocaleAction.setting}">
+	    <h:outputText value="#{messages['jsf.AvailableLocales']}"/>
+	    <h:outputText value=""/>
+	    <h:outputText value="#{messages['jsf.SelectedLocales']}"/>
+            <h:selectManyListbox id ="languagelist2" value="#{projectIterationLocaleAction.availableList}" styleClass="language_list">
+                <f:selectItems value="#{iterationAvailableItems}"/>
+		<a4j:support event="ondblclick" reRender="languagePanel" action="#{projectIterationLocaleAction.toCustomizedLocales}"/>
+            </h:selectManyListbox>
+            <h:panelGroup id="buttons" styleClass="language_action_buttons">
+                <a4j:commandButton value="&gt;" action="#{projectIterationLocaleAction.toCustomizedLocales}" styleClass="language_action_button" reRender ="languagePanel" />
+                <a4j:commandButton value="&lt;" action="#{projectIterationLocaleAction.removeFromCustomizedLocales}" styleClass="language_action_button" reRender ="languagePanel" />
+            </h:panelGroup>
+            <h:selectManyListbox id="languagelist1" value="#{projectIterationLocaleAction.customizedLocales}" styleClass="language_list" >
+                <f:selectItems value="#{projectIterationLocaleAction.iterationCustomizedItems}"/>
+		<a4j:support event="ondblclick" reRender="languagePanel" action="#{projectIterationLocaleAction.removeFromCustomizedLocales}"/>
+            </h:selectManyListbox>
+      	</h:panelGrid>
+	</a4j:region>
+	</s:div>
 
 
     <div class="actionButtons">

File server/flies-war/src/main/webapp/WEB-INF/layout/iteration_view_inline.xhtml

View file
   <div class="list_view_header">
     <h2>#{_iteration.slug}</h2>
     <div class="menu_items">
-      <s:link view="/project/iteration_locale.xhtml" propagation="none" rendered="#{s:hasPermission(_iteration, 'update') and _iteration.overrideLocales}" value="#{messages['jsf.ManageLanguage']}">
+      <s:link view="/project/iteration_status.xhtml" propagation="none" rendered="#{identity.loggedIn}" value="#{messages['jsf.ViewStatus']}">
         <f:param name="iterationSlug" value="#{_iteration.slug}"/>
         <f:param name="projectSlug" value="#{projectHome.instance.slug}"/>
       </s:link>
         <f:param name="slug" value="#{_iteration.slug}"/>
         <f:param name="projectSlug" value="#{projectHome.instance.slug}"/>
       </s:link>
-      <rich:spacer width="10px" />
-      <s:link view="/project/iteration_status.xhtml" propagation="none" rendered="#{identity.loggedIn}" value="#{messages['jsf.ViewStatus']}">
-        <f:param name="iterationSlug" value="#{_iteration.slug}"/>
-        <f:param name="projectSlug" value="#{projectHome.instance.slug}"/>
-      </s:link>
     </div>
   </div>
   <rich:dataTable id="data_table" width="100%" value="#{iterationTranslationAction.getTranslationLocale(projectHome.instance.slug, _iteration.slug)}"

File server/flies-war/src/main/webapp/WEB-INF/layout/project_edit_form.xhtml

View file
 
     </rich:panel>
 
-
-	<div>
+	<s:div>
+		<a4j:region>
 		<h:selectBooleanCheckbox
 		 title="overrideLocales"
-		  value="#{projectHome.instance.overrideLocales}" >
+		  value="#{localeListAction.setting}" >
+			<a4j:support event="onchange" reRender="languagelist" />
 		</h:selectBooleanCheckbox>
+		</a4j:region>
 		<h:outputText
 		  value="Would you like add a customized list of locales?"/>
-	</div>
+	</s:div>
 
 
+	<s:div id="languagelist">
+	<rich:spacer height="20px" />
+	<a4j:region renderRegionOnly="true">
+      	<h:panelGrid columns="3" id ="languagePanel" rendered="#{localeListAction.setting}">
+	    <h:outputText value="#{messages['jsf.AvailableLocales']}"/>
+	    <h:outputText value=""/>
+	    <h:outputText value="#{messages['jsf.SelectedLocales']}"/>
+            <h:selectManyListbox id ="languagelist2" value="#{localeListAction.availableList}" styleClass="language_list">
+                <f:selectItems value="#{availableItems}"/>
+		<a4j:support event="ondblclick" reRender="languagePanel" action="#{localeListAction.toCustomizedLocales}"/>
+            </h:selectManyListbox>
+            <h:panelGroup id="buttons" styleClass="language_action_buttons">
+                <a4j:commandButton value="&gt;" action="#{localeListAction.toCustomizedLocales}" styleClass="language_action_button" reRender ="languagePanel" />
+                <a4j:commandButton value="&lt;" action="#{localeListAction.removeFromCustomizedLocales}" styleClass="language_action_button" reRender ="languagePanel" />
+            </h:panelGroup>
+            <h:selectManyListbox id="languagelist1" value="#{localeListAction.customizedLocales}" styleClass="language_list" >
+                <f:selectItems value="#{localeListAction.customizedItems}"/>
+		<a4j:support event="ondblclick" reRender="languagePanel" action="#{localeListAction.removeFromCustomizedLocales}"/>
+            </h:selectManyListbox>
+      	</h:panelGrid>
+	</a4j:region>
+	</s:div>
+
     <div class="actionButtons">
         <h:commandButton id="save"
                       value="#{messages['jsf.Save']}"

File server/flies-war/src/main/webapp/WEB-INF/layout/template.xhtml

View file
 					<s:link id="Sign_out" view="/home.xhtml" action="#{identity.logout}"
 					value="#{messages['jsf.SignOut']}" rendered="#{identity.loggedIn}" propagation="none" />
 					<rich:spacer width="5px" />
-					<a href="#{applicationConfiguration.helpPath}">#{messages['jsf.Help']}</a>
+					<s:link id="help_url" view="/help/view.xhtml" value="#{messages['jsf.Help']}" propagation="none" />
 				</div>
 				<div id="loading_top_right">
 					<a:status>

File server/flies-war/src/main/webapp/WEB-INF/pages.xml

View file
 
   <page view-id="/project/edit.xhtml" login-required="true">
     <param name="slug" value="#{projectHome.slug}" />
+    <param name="slug" value="#{localeListAction.slug}" />
     
     <!-- we can't use <restrict> on projectHome.instance because it creates
          a brand-new HProject instead of loading the existing one
       </redirect>
     </navigation>
   </page>
-  
-  <page view-id="/project/project_locale.xhtml" >
-    <param name="projectSlug" value="#{projectLocaleManageAction.projectSlug}" />
-    <action execute="#{projectLocaleManageAction.loadCustomizedLocales()}" />
-  </page>
-
-  <page view-id="/project/project_locale_detail.xhtml">
-    <param name="projectSlug" value="#{projectLocaleManageAction.projectSlug}" />
-    <navigation from-action="#{projectLocaleManageAction.addLocale(projectLocaleDetailAction.language)}">
-      <rule if-outcome="success">
-        <redirect view-id="/project/project_locale.xhtml" >
-		    <param name="projectSlug" value="#{projectLocaleManageAction.projectSlug}" />
-        </redirect>
-      </rule>
-    </navigation>
-    <navigation from-action="#{projectLocaleManageAction.cancel}">
-      <redirect view-id="/project/project_locale.xhtml" >
-	    <param name="projectSlug" value="#{projectLocaleManageAction.projectSlug}" />
-      </redirect>
-    </navigation>
-  </page>
-
-  <page view-id="/project/iteration_locale.xhtml" >
-    <param name="projectSlug" value="#{iterationLocaleManageAction.projectSlug}" />
-    <param name="iterationSlug" value="#{iterationLocaleManageAction.iterationSlug}" />
-    <action execute="#{iterationLocaleManageAction.loadCustomizedLocales()}" />
-  </page>
-
-  <page view-id="/project/iteration_locale_detail.xhtml">
-    <param name="projectSlug" value="#{iterationLocaleManageAction.projectSlug}" />
-    <param name="iterationSlug" value="#{iterationLocaleManageAction.iterationSlug}" />
-    <navigation from-action="#{iterationLocaleManageAction.addLocale(projectLocaleDetailAction.language)}">
-      <rule if-outcome="success">
-        <redirect view-id="/project/iteration_locale.xhtml" >
-		    <param name="projectSlug" value="#{iterationLocaleManageAction.projectSlug}" />
-		    <param name="iterationSlug" value="#{iterationLocaleManageAction.iterationSlug}" />
-        </redirect>
-      </rule>
-    </navigation>
-    <navigation from-action="#{iterationLocaleManageAction.cancel}">
-      <redirect view-id="/project/iteration_locale.xhtml" >
-		    <param name="projectSlug" value="#{iterationLocaleManageAction.projectSlug}" />
-		    <param name="iterationSlug" value="#{iterationLocaleManageAction.iterationSlug}" />
-      </redirect>
-    </navigation>
-  </page>
 
   <page view-id="/project/add_iteration.xhtml">
     <param name="projectSlug" value="#{projectIterationHome.projectSlug}" />
+    <param name="projectSlug" value="#{projectIterationLocaleAction.projectSlug}" />
     <action execute="#{projectIterationHome.validateProjectSlug}" />
     <!-- can't use <restrict> here either --> 
     <action execute="#{identity.checkPermission(projectIterationHome.instance, 'insert')}" />
   <page view-id="/project/iteration_edit.xhtml">
     <param name="slug" value="#{projectIterationHome.slug}" />
     <param name="projectSlug" value="#{projectIterationHome.projectSlug}" />
+    <param name="slug" value="#{projectIterationLocaleAction.iterationSlug}" />
+    <param name="projectSlug" value="#{projectIterationLocaleAction.projectSlug}" />
     <action execute="#{projectIterationHome.validateSuppliedId}" />
     <!-- can't use <restrict> here either -->
     <action execute="#{identity.checkPermission(projectIterationHome.instance, 'update')}" />
     <param name="iterationSlug" value="#{viewAllStatusAction.iterationSlug}" />
   </page>
 
+
   <!-- Language -->
 
   <page view-id="/language/language.xhtml">

File server/flies-war/src/main/webapp/WEB-INF/urlrewrite.xml

View file
   </rule>
 
   <rule>
+    <from casesensitive="true">^/project/edit(.+)$</from>
+    <to last="true">/project/edit.seam?$1</to>
+  </rule>
+
+  <rule>
     <from casesensitive="true">^/project/list(.+)?$</from>
     <to last="true">/project/home.seam$1</to>
   </rule>
     <to>$1/project/create/$2</to>
   </outbound-rule>
   <outbound-rule>
+    <from>^(/.+)?/project/edit.seam(.+)$</from>
+    <to>$1/project/edit/$2</to>
+  </outbound-rule>
+  <outbound-rule>
     <from>^(/.+)?/project/assign_maintainer.seam(.+)?$</from>
     <to>$1/project/maintainer/$2</to>
   </outbound-rule>

File server/flies-war/src/main/webapp/admin/server_configuration.xhtml

View file
               </h:graphicImage>
             </s:decorate>
                 
-            <s:decorate id="helpField" template="../WEB-INF/layout/edit.xhtml">
-              <ui:define name="label">#{messages['jsf.HelpUrl']}</ui:define>
-              <h:inputText id="url" value="#{serverConfigurationBean.helpUrl}">
-                <a4j:support event="onblur" reRender="helpField" ajaxSingle="false"/>
-              </h:inputText>
-              <h:graphicImage id="urlHelp" value="../img/msginfo.png" styleClass="input_help">
-                <rich:toolTip>
-                  #{messages['jsf.HelpUrlToolTip']}
-                  <br/>
-                  <em><code>#{messages['jsf.HelpUrlExample']}</code></em>
-                </rich:toolTip>
-              </h:graphicImage>
-            </s:decorate>
-                
             <s:decorate id="emailDomainField" template="../WEB-INF/layout/edit.xhtml">
               <ui:define name="label">#{messages['jsf.EmailDomainName']}</ui:define>
               <h:inputText id="url" value="#{serverConfigurationBean.emailDomain}">

File server/flies-war/src/main/webapp/help/view.xhtml

View file
     template="/WEB-INF/layout/template.xhtml">
     
     <ui:define name="center_content">
+        <rich:jQuery selector="#tab_help" query="addClass('ui-tabs-selected')" />
        <s:formattedText id="project-home-content" value="#{applicationConfiguration.helpContent}"></s:formattedText>
  </ui:define>
 

File server/flies-war/src/main/webapp/project/Iteration_locale.xhtml

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:s="http://jboss.com/products/seam/taglib"
-    xmlns:ui="http://java.sun.com/jsf/facelets"
-    xmlns:f="http://java.sun.com/jsf/core"
-    xmlns:h="http://java.sun.com/jsf/html"
-    xmlns:rich="http://richfaces.org/rich"
-    xmlns:a4j="http://richfaces.org/a4j"
-    template="../WEB-INF/layout/template.xhtml">
-   
-    <ui:define name="left_content">
-		<s:link view="/project/iteration_locale_detail.xhtml"
-          value="#{messages['jsf.CreateSupportedLanguage']}">
-        </s:link>
-    </ui:define>
-   
-    <ui:define name="center_content">
-        
-      <script type="text/javascript">
-        function confirmDelete()
-        {
-          return confirm("#{messages['jsf.AreYouSureYouWishToDeleteThisLanguageThisActionCannotBeUndone']}");
-        }
-      </script>
-      <rich:panel rendered="#{s:hasPermission(iterationLocaleManageAction.project, 'update')}">
-        <f:facet name="header">#{messages['jsf.LanguageManager']}</f:facet>
-		<h:messages />
-		
-        <h:form>
-            <s:token allowMultiplePosts="true" />
-	        <rich:dataTable 
-	            id="threads"
-	            value="#{customizedLocales}" 
-	            var="language">
-	
-		    <ui:include src="../WEB-INF/layout/language_list.xhtml" />
-
-	          <rich:column width="auto">
-	            <f:facet name="header">#{messages['jsf.Actions']}</f:facet>          
-	            <h:commandLink value="#{messages['jsf.Remove']}" action="#{iterationLocaleManageAction.deleteLocale(iterationLocaleManageAction.selectedLocale)}"
-	                      onclick="return confirmDelete()"/>
-	          </rich:column>
-	  	    </rich:dataTable>
-        </h:form>              
-      </rich:panel>
-    </ui:define>
-    
-  </ui:composition>

File server/flies-war/src/main/webapp/project/iteration_locale.xhtml

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:s="http://jboss.com/products/seam/taglib"
-    xmlns:ui="http://java.sun.com/jsf/facelets"
-    xmlns:f="http://java.sun.com/jsf/core"
-    xmlns:h="http://java.sun.com/jsf/html"
-    xmlns:rich="http://richfaces.org/rich"
-    xmlns:a4j="http://richfaces.org/a4j"
-    template="../WEB-INF/layout/template.xhtml">
-   
-    <ui:define name="left_content">
-		<s:link view="/project/iteration_locale_detail.xhtml"
-          value="#{messages['jsf.CreateSupportedLanguage']}">
-        </s:link>
-    </ui:define>
-   
-    <ui:define name="center_content">
-        
-      <script type="text/javascript">
-        function confirmDelete()
-        {
-          return confirm("#{messages['jsf.AreYouSureYouWishToDeleteThisLanguageThisActionCannotBeUndone']}");
-        }
-      </script>
-      <rich:panel rendered="#{s:hasPermission(iterationLocaleManageAction.project, 'update')}">
-        <f:facet name="header">#{messages['jsf.LanguageManager']}</f:facet>
-		<h:messages />
-		
-        <h:form>
-            <s:token allowMultiplePosts="true" />
-	        <rich:dataTable 
-	            id="threads"
-	            value="#{customizedLocales}" 
-	            var="language">
-	
-		    <ui:include src="../WEB-INF/layout/language_list.xhtml" />
-
-	          <rich:column width="auto">
-	            <f:facet name="header">#{messages['jsf.Actions']}</f:facet>          
-	            <h:commandLink value="#{messages['jsf.Remove']}" action="#{iterationLocaleManageAction.deleteLocale(iterationLocaleManageAction.selectedLocale)}"
-	                      onclick="return confirmDelete()"/>
-	          </rich:column>
-	  	    </rich:dataTable>
-        </h:form>              
-      </rich:panel>
-    </ui:define>
-    
-  </ui:composition>

File server/flies-war/src/main/webapp/project/iteration_locale_detail.xhtml

-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:s="http://jboss.com/products/seam/taglib"
-	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:f="http://java.sun.com/jsf/core"
-	xmlns:h="http://java.sun.com/jsf/html"
-	xmlns:rich="http://richfaces.org/rich"
-	xmlns:a4j="http://richfaces.org/a4j"
-	template="../WEB-INF/layout/template.xhtml">
-
-	<ui:define name="center_content">
-
-
-		<h:form>
-			<s:token allowMultiplePosts="true" />
-			<rich:panel rendered="#{s:hasPermission(iterationLocaleManageAction.project, 'update')}">
-			        <ui:include src="../WEB-INF/layout/project_language_detail.xhtml" />
-
-				<div style="clear: both" />
-
-				<div class="actionButtons"><h:commandButton
-					value="#{messages['jsf.Save']}"
-					action="#{iterationLocaleManageAction.addLocale(projectLocaleDetailAction.language)}" /> <s:button
-					value="#{messages['jsf.Cancel']}" action="#{iterationLocaleManageAction.cancel}" propagation="end" /></div>
-			</rich:panel>
-		</h:form>
-
-	</ui:define>
-
-</ui:composition>

File server/flies-war/src/main/webapp/project/project.xhtml

View file
     <s:link styleClass="action_link" rendered="#{s:hasPermission(projectHome.instance, 'update')}" view="/project/assign_maintainer.xhtml" value="#{messages['jsf.ManageMaintainers']}" propagation="none">
     	<f:param name="projectSlug" value="#{projectHome.instance.slug}"/>
     </s:link>
-    <s:link styleClass="action_link" rendered="#{s:hasPermission(projectHome.instance, 'update') and projectHome.instance.overrideLocales}" view="/project/project_locale.xhtml" value="#{messages['jsf.ManageLanguage']}" propagation="none">
-    	<f:param name="projectSlug" value="#{projectHome.instance.slug}"/>
-    </s:link>
   </rich:panel>
 
   <rich:panel>