1 package org.jahia.deprecated.taglibs.button; 2 3 import javax.servlet.jsp.JspException ; 4 5 import org.jahia.data.JahiaData; 6 import org.jahia.exceptions.JahiaException; 7 import org.jahia.services.usermanager.JahiaUser; 8 9 10 16 public class PagePropertiesButtonTag extends AbstractButtonTag { 17 18 private String title = "Page Properties"; 19 private String style = ""; 20 21 public void setTitle(String title) { 22 this.title = title; 23 } 24 25 public void setStyle(String style) { 26 this.style = style; 27 } 28 29 public String getTitle() { 30 return this.title; 31 } 32 33 public String getStyle() { 34 return this.style; 35 } 36 37 public boolean testRights(JahiaData jData) { 38 JahiaUser user = jData.params().getUser(); 39 return jData.page().checkWriteAccess(user) 40 && jData.gui().isEditMode(); 41 } 42 43 public String getLauncher(JahiaData jData) throws JahiaException { 44 return "javascript:" + jData.gui().html().drawPagePropertiesLauncher(); 45 } 46 47 public int doEndTag() throws JspException { 48 title = "Page Properties"; 51 style = ""; 52 return EVAL_PAGE; 53 } 54 55 } 56 | Popular Tags |