r2071 - in trunk/wao-web/src/main: java/fr/ifremer/wao/web/action java/fr/ifremer/wao/web/action/obsmer webapp/WEB-INF/content webapp/WEB-INF/content/obsmer
Author: bleny Date: 2014-06-19 16:33:56 +0200 (Thu, 19 Jun 2014) New Revision: 2071 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2071 Log: refs #4552 news page for obsvente Added: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/DeleteNewsAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditNewsAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/NewsAction.java trunk/wao-web/src/main/webapp/WEB-INF/content/edit-news-input.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/news.jsp Removed: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/DeleteNewsAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/EditNewsAction.java trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/NewsAction.java trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp Copied: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/DeleteNewsAction.java (from rev 2060, trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/DeleteNewsAction.java) =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/DeleteNewsAction.java (rev 0) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/DeleteNewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -0,0 +1,59 @@ +package fr.ifremer.wao.web.action; + +/* + * #%L + * Wao :: Web + * %% + * Copyright (C) 2009 - 2014 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +import fr.ifremer.wao.services.service.administration.NewsService; +import fr.ifremer.wao.web.WaoJspActionSupport; +import org.apache.struts2.convention.annotation.Result; +import org.apache.struts2.convention.annotation.Results; + +@Results({ + @Result(name="success", type="redirectAction", params = { "actionName", "news" }) +}) +public class DeleteNewsAction extends WaoJspActionSupport { + + private static final long serialVersionUID = 1L; + + protected transient NewsService service; + + protected String newsId; + + public void setService(NewsService service) { + this.service = service; + } + + public void setNewsId(String newsId) { + this.newsId = newsId; + } + + @Override + public String execute() { + + service.delete(newsId); + + addActionMessage("Suppression effectuée"); + + return SUCCESS; + + } + +} Copied: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditNewsAction.java (from rev 2060, trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/EditNewsAction.java) =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditNewsAction.java (rev 0) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditNewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -0,0 +1,93 @@ +package fr.ifremer.wao.web.action; + +/* + * #%L + * Wao :: Web + * %% + * Copyright (C) 2009 - 2014 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +import com.opensymphony.xwork2.Preparable; +import fr.ifremer.wao.entity.News; +import fr.ifremer.wao.services.service.administration.NewsService; +import fr.ifremer.wao.web.WaoJspActionSupport; +import org.apache.commons.lang3.StringUtils; +import org.apache.struts2.convention.annotation.Result; +import org.apache.struts2.convention.annotation.Results; +import org.jsoup.Jsoup; +import org.jsoup.safety.Whitelist; + +@Results({ + @Result(name="success", type="redirectAction", params = { "actionName", "news" }) +}) +public class EditNewsAction extends WaoJspActionSupport implements Preparable { + + private static final long serialVersionUID = 1L; + + protected static final Whitelist WHITE_LIST = Whitelist.basicWithImages().addTags("h1", "h2", "h3"); + + protected transient NewsService service; + + protected String newsId; + + protected News news; + + public void setService(NewsService service) { + this.service = service; + } + + public void setNewsId(String newsId) { + this.newsId = newsId; + } + + public void setNews(News news) { + this.news = news; + } + + @Override + public void prepare() { + if (StringUtils.isEmpty(newsId)) { + news = service.newNews(getAuthenticatedWaoUser()); + } else { + news = service.getNews(newsId); + } + } + + @Override + public String execute() { + + //filtrage de news + String clean = Jsoup.clean(news.getContent(), WHITE_LIST); + news.setContent(clean); + + service.save(news); + + addActionMessage(t("wao.ui.action.createNews.success")); + + return SUCCESS; + + } + + public String getNewsId() { + return newsId; + } + + public News getNews() { + return news; + } + +} Copied: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/NewsAction.java (from rev 2060, trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/NewsAction.java) =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/NewsAction.java (rev 0) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/NewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -0,0 +1,55 @@ +package fr.ifremer.wao.web.action; + +/* + * #%L + * Wao :: Web + * %% + * Copyright (C) 2009 - 2014 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ + +import fr.ifremer.wao.entity.News; +import fr.ifremer.wao.services.service.administration.NewsService; +import fr.ifremer.wao.web.WaoJspActionSupport; + +import java.util.List; + +public class NewsAction extends WaoJspActionSupport { + + private static final long serialVersionUID = 1L; + + protected transient NewsService service; + + protected List<News> recentNews; + + public void setService(NewsService service) { + this.service = service; + } + + @Override + public String execute() { + + recentNews = service.getRecentNews(getAuthenticatedWaoUser(), 15); + + return SUCCESS; + + } + + public List<News> getRecentNews() { + return recentNews; + } + +} Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/DeleteNewsAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/DeleteNewsAction.java 2014-06-19 13:47:26 UTC (rev 2070) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/DeleteNewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -1,59 +0,0 @@ -package fr.ifremer.wao.web.action.obsmer; - -/* - * #%L - * Wao :: Web - * %% - * Copyright (C) 2009 - 2014 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import fr.ifremer.wao.services.service.administration.NewsService; -import fr.ifremer.wao.web.WaoJspActionSupport; -import org.apache.struts2.convention.annotation.Result; -import org.apache.struts2.convention.annotation.Results; - -@Results({ - @Result(name="success", type="redirectAction", params = { "actionName", "news" }) -}) -public class DeleteNewsAction extends WaoJspActionSupport { - - private static final long serialVersionUID = 1L; - - protected transient NewsService service; - - protected String newsId; - - public void setService(NewsService service) { - this.service = service; - } - - public void setNewsId(String newsId) { - this.newsId = newsId; - } - - @Override - public String execute() { - - service.delete(newsId); - - addActionMessage("Suppression effectuée"); - - return SUCCESS; - - } - -} Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/EditNewsAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/EditNewsAction.java 2014-06-19 13:47:26 UTC (rev 2070) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/EditNewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -1,93 +0,0 @@ -package fr.ifremer.wao.web.action.obsmer; - -/* - * #%L - * Wao :: Web - * %% - * Copyright (C) 2009 - 2014 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import com.opensymphony.xwork2.Preparable; -import fr.ifremer.wao.entity.News; -import fr.ifremer.wao.services.service.administration.NewsService; -import fr.ifremer.wao.web.WaoJspActionSupport; -import org.apache.commons.lang3.StringUtils; -import org.apache.struts2.convention.annotation.Result; -import org.apache.struts2.convention.annotation.Results; -import org.jsoup.Jsoup; -import org.jsoup.safety.Whitelist; - -@Results({ - @Result(name="success", type="redirectAction", params = { "actionName", "news" }) -}) -public class EditNewsAction extends WaoJspActionSupport implements Preparable { - - private static final long serialVersionUID = 1L; - - protected static final Whitelist WHITE_LIST = Whitelist.basicWithImages().addTags("h1", "h2", "h3"); - - protected transient NewsService service; - - protected String newsId; - - protected News news; - - public void setService(NewsService service) { - this.service = service; - } - - public void setNewsId(String newsId) { - this.newsId = newsId; - } - - public void setNews(News news) { - this.news = news; - } - - @Override - public void prepare() { - if (StringUtils.isEmpty(newsId)) { - news = service.newNews(getAuthenticatedWaoUser()); - } else { - news = service.getNews(newsId); - } - } - - @Override - public String execute() { - - //filtrage de news - String clean = Jsoup.clean(news.getContent(), WHITE_LIST); - news.setContent(clean); - - service.save(news); - - addActionMessage(t("wao.ui.action.createNews.success")); - - return SUCCESS; - - } - - public String getNewsId() { - return newsId; - } - - public News getNews() { - return news; - } - -} Deleted: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/NewsAction.java =================================================================== --- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/NewsAction.java 2014-06-19 13:47:26 UTC (rev 2070) +++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/NewsAction.java 2014-06-19 14:33:56 UTC (rev 2071) @@ -1,55 +0,0 @@ -package fr.ifremer.wao.web.action.obsmer; - -/* - * #%L - * Wao :: Web - * %% - * Copyright (C) 2009 - 2014 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import fr.ifremer.wao.entity.News; -import fr.ifremer.wao.services.service.administration.NewsService; -import fr.ifremer.wao.web.WaoJspActionSupport; - -import java.util.List; - -public class NewsAction extends WaoJspActionSupport { - - private static final long serialVersionUID = 1L; - - protected transient NewsService service; - - protected List<News> recentNews; - - public void setService(NewsService service) { - this.service = service; - } - - @Override - public String execute() { - - recentNews = service.getRecentNews(getAuthenticatedWaoUser(), 15); - - return SUCCESS; - - } - - public List<News> getRecentNews() { - return recentNews; - } - -} Copied: trunk/wao-web/src/main/webapp/WEB-INF/content/edit-news-input.jsp (from rev 2060, trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp) =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/edit-news-input.jsp (rev 0) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/edit-news-input.jsp 2014-06-19 14:33:56 UTC (rev 2071) @@ -0,0 +1,69 @@ +<%-- + #%L + Wao :: Web + %% + Copyright (C) 2009 - 2014 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@taglib uri="/struts-tags" prefix="s" %> + +<html> + <head> + <link rel="stylesheet" type="text/css" href="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.css' />" /> + <script src="<s:url value='/wysihtml5-0.3.0/wysihtml5.js'/>"></script> + <script src="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.js' />"></script> + <s:if test="!getText('wao.ui.wysihtml5.lang').equals('en')"> + <script src="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.%{getText("wao.ui.wysihtml5.lang")}.js' />"></script> + </s:if> + <script> + $(document).ready(function () { + $("#editor").wysihtml5({ + locale: "<s:property value="%{getText('wao.ui.wysihtml5.lang')}"/>", + stylesheets: ["<s:url value='/bootstrap-wysihtml5-0.0.2/wysiwyg-color.css' />"] + }); + }); + </script> + <content tag="mainClass">form</content> + + </head> + + <s:form onsubmit="save();"> + + <s:hidden name="newsId" value="%{newsId}" /> + + <s:textfield name="news.title" label="%{getText('wao.ui.news.title')}" cssClass="input-xxlarge" /> + + <s:textarea label="%{getText('wao.ui.news.content')}" + name="news.content" + id="editor" + rows="8"/> + + <div class="form-actions"> + <s:url action="news" id="newsUrl" /> + <s:a href="%{newsUrl}" cssClass="btn"> + <i class="icon-chevron-left"></i> <s:text name="wao.ui.action.cancel" /> + </s:a> + + <s:submit type="button" cssClass="btn"> + <i class="icon-hdd"></i> <s:text name="wao.ui.action.save" /> + </s:submit> + </div> + + </s:form> + +</html> + Copied: trunk/wao-web/src/main/webapp/WEB-INF/content/news.jsp (from rev 2060, trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp) =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/news.jsp (rev 0) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/news.jsp 2014-06-19 14:33:56 UTC (rev 2071) @@ -0,0 +1,88 @@ +<%-- + #%L + Wao :: Web + %% + Copyright (C) 2009 - 2014 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@taglib uri="/struts-tags" prefix="s" %> + +<content tag="newsMenuItemClass">active</content> + +<html> + + <head> + + </head> + + <content tag="mainClass">home</content> + + <s:if test="authenticatedWaoUser.authorizedToCreateNews"> + <content tag="administrationMenuOtherOptions"> + <li> + <s:url action="edit-news!input" id="createNewsUrl"/> + <s:a href="%{createNewsUrl}"> + <i class="fa fa-plus-square"></i> <s:text name="wao.ui.action.createNews"/> + </s:a> + </li> + </content> + </s:if> + + <div class="buttons-area"> + </div> + + <s:iterator value="recentNews" var="aRecentNews"> + + <div class="news"> + <h2> + <s:property value="title" /> + </h2> + + <s:property value="content" escapeHtml="false" /> + + <p class="publication"> + <s:if test="fromAdmin"> + <s:text name="wao.ui.publishedByProgram" /> + </s:if> + <s:else> + <s:text name="wao.ui.publishedByYourCompany" /> + </s:else> + <s:text name="wao.ui.misc.onDate" /> + <s:property value="topiaCreateDate" /> + + <s:if test="authenticatedWaoUser.isAuthorizedToEditOrDeleteNews(#aRecentNews)"> + + <s:url action="delete-news" id="deleteNewsUrl"> + <s:param name="newsId" value="topiaId" /> + </s:url> + <s:a href="%{deleteNewsUrl}" cssClass="btn-link" title="%{getText('wao.ui.action.delete')}" > + <i class="fa fa-trash-o"></i> + </s:a> + + <s:url action="edit-news!input" id="editNewsUrl"> + <s:param name="newsId" value="topiaId" /> + </s:url> + <s:a href="%{editNewsUrl}" cssClass="btn-link btn-link-edit" title="%{getText('wao.ui.action.edit')}"> + <i class="fa fa-edit"></i> + </s:a> + </s:if> + </p> + </div> + + </s:iterator> + +</html> Deleted: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp 2014-06-19 13:47:26 UTC (rev 2070) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp 2014-06-19 14:33:56 UTC (rev 2071) @@ -1,69 +0,0 @@ -<%-- - #%L - Wao :: Web - %% - Copyright (C) 2009 - 2014 Ifremer - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@taglib uri="/struts-tags" prefix="s" %> - -<html> - <head> - <link rel="stylesheet" type="text/css" href="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.css' />" /> - <script src="<s:url value='/wysihtml5-0.3.0/wysihtml5.js'/>"></script> - <script src="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.js' />"></script> - <s:if test="!getText('wao.ui.wysihtml5.lang').equals('en')"> - <script src="<s:url value='/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.%{getText("wao.ui.wysihtml5.lang")}.js' />"></script> - </s:if> - <script> - $(document).ready(function () { - $("#editor").wysihtml5({ - locale: "<s:property value="%{getText('wao.ui.wysihtml5.lang')}"/>", - stylesheets: ["<s:url value='/bootstrap-wysihtml5-0.0.2/wysiwyg-color.css' />"] - }); - }); - </script> - <content tag="mainClass">form</content> - - </head> - - <s:form onsubmit="save();"> - - <s:hidden name="newsId" value="%{newsId}" /> - - <s:textfield name="news.title" label="%{getText('wao.ui.news.title')}" cssClass="input-xxlarge" /> - - <s:textarea label="%{getText('wao.ui.news.content')}" - name="news.content" - id="editor" - rows="8"/> - - <div class="form-actions"> - <s:url action="news" id="newsUrl" /> - <s:a href="%{newsUrl}" cssClass="btn"> - <i class="icon-chevron-left"></i> <s:text name="wao.ui.action.cancel" /> - </s:a> - - <s:submit type="button" cssClass="btn"> - <i class="icon-hdd"></i> <s:text name="wao.ui.action.save" /> - </s:submit> - </div> - - </s:form> - -</html> - Deleted: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-06-19 13:47:26 UTC (rev 2070) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-06-19 14:33:56 UTC (rev 2071) @@ -1,88 +0,0 @@ -<%-- - #%L - Wao :: Web - %% - Copyright (C) 2009 - 2014 Ifremer - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> -<%@taglib uri="/struts-tags" prefix="s" %> - -<content tag="newsMenuItemClass">active</content> - -<html> - - <head> - - </head> - - <content tag="mainClass">home</content> - - <s:if test="authenticatedWaoUser.authorizedToCreateNews"> - <content tag="administrationMenuOtherOptions"> - <li> - <s:url action="edit-news!input" id="createNewsUrl"/> - <s:a href="%{createNewsUrl}"> - <i class="fa fa-plus-square"></i> <s:text name="wao.ui.action.createNews"/> - </s:a> - </li> - </content> - </s:if> - - <div class="buttons-area"> - </div> - - <s:iterator value="recentNews" var="aRecentNews"> - - <div class="news"> - <h2> - <s:property value="title" /> - </h2> - - <s:property value="content" escapeHtml="false" /> - - <p class="publication"> - <s:if test="fromAdmin"> - <s:text name="wao.ui.publishedByProgram" /> - </s:if> - <s:else> - <s:text name="wao.ui.publishedByYourCompany" /> - </s:else> - <s:text name="wao.ui.misc.onDate" /> - <s:property value="topiaCreateDate" /> - - <s:if test="authenticatedWaoUser.isAuthorizedToEditOrDeleteNews(#aRecentNews)"> - - <s:url action="delete-news" id="deleteNewsUrl"> - <s:param name="newsId" value="topiaId" /> - </s:url> - <s:a href="%{deleteNewsUrl}" cssClass="btn-link" title="%{getText('wao.ui.action.delete')}" > - <i class="fa fa-trash-o"></i> - </s:a> - - <s:url action="edit-news!input" id="editNewsUrl"> - <s:param name="newsId" value="topiaId" /> - </s:url> - <s:a href="%{editNewsUrl}" cssClass="btn-link btn-link-edit" title="%{getText('wao.ui.action.edit')}"> - <i class="fa fa-edit"></i> - </s:a> - </s:if> - </p> - </div> - - </s:iterator> - -</html>
participants (1)
-
bleny@users.forge.codelutin.com