Notes testet jetzt den Bearbeitungsstatus (Ticket #119)
git-svn-id: https://svn.libreccm.org/ccm/trunk@1587 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
fccc6ba631
commit
21dfb7fec1
|
|
@ -13,7 +13,6 @@ You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.cms.contentassets.ui;
|
package com.arsdigita.cms.contentassets.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
import com.arsdigita.bebop.PageState;
|
||||||
|
|
@ -31,19 +30,22 @@ import com.arsdigita.web.RedirectSignal;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
|
|
||||||
import com.arsdigita.cms.contentassets.Note;
|
import com.arsdigita.cms.contentassets.Note;
|
||||||
|
import com.arsdigita.cms.util.SecurityConstants;
|
||||||
|
import com.arsdigita.kernel.Kernel;
|
||||||
|
import com.arsdigita.kernel.User;
|
||||||
|
import com.arsdigita.workflow.simple.Workflow;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
public class NotesDisplay extends SimpleComponent {
|
public class NotesDisplay extends SimpleComponent {
|
||||||
private static final Logger s_log = Logger.getLogger( NotesDisplay.class );
|
|
||||||
|
|
||||||
|
private static final Logger s_log = Logger.getLogger(NotesDisplay.class);
|
||||||
private static final String DELETE = "delete";
|
private static final String DELETE = "delete";
|
||||||
private static final String EDIT = "edit";
|
private static final String EDIT = "edit";
|
||||||
private static final String UP = "up";
|
private static final String UP = "up";
|
||||||
private static final String DOWN = "down";
|
private static final String DOWN = "down";
|
||||||
|
|
||||||
private NotesStep m_step;
|
private NotesStep m_step;
|
||||||
private ACSObjectSelectionModel m_noteModel;
|
private ACSObjectSelectionModel m_noteModel;
|
||||||
|
|
||||||
|
|
@ -68,18 +70,12 @@ public class NotesDisplay extends SimpleComponent {
|
||||||
|
|
||||||
if (DELETE.equals(name)) {
|
if (DELETE.equals(name)) {
|
||||||
note.delete();
|
note.delete();
|
||||||
}
|
} else if (EDIT.equals(name)) {
|
||||||
|
|
||||||
else if( EDIT.equals( name ) ) {
|
|
||||||
m_noteModel.setSelectedObject(ps, note);
|
m_noteModel.setSelectedObject(ps, note);
|
||||||
m_step.showComponent(ps, NotesStep.EDIT);
|
m_step.showComponent(ps, NotesStep.EDIT);
|
||||||
}
|
} else if (UP.equals(name)) {
|
||||||
|
|
||||||
else if( UP.equals( name ) ) {
|
|
||||||
note.setRank(note.getRank() - 1);
|
note.setRank(note.getRank() - 1);
|
||||||
}
|
} else if (DOWN.equals(name)) {
|
||||||
|
|
||||||
else if( DOWN.equals( name ) ) {
|
|
||||||
note.setRank(note.getRank() + 1);
|
note.setRank(note.getRank() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,6 +107,9 @@ public class NotesDisplay extends SimpleComponent {
|
||||||
Note note = new Note(notes.getDataObject());
|
Note note = new Note(notes.getDataObject());
|
||||||
String oid = note.getOID().toString();
|
String oid = note.getOID().toString();
|
||||||
|
|
||||||
|
if (CMS.getSecurityManager(ps).canAccess(ps.getRequest(),
|
||||||
|
SecurityConstants.EDIT_ITEM,
|
||||||
|
item)) {
|
||||||
Element edit = root.newChildElement("cms:notesAction",
|
Element edit = root.newChildElement("cms:notesAction",
|
||||||
CMS.CMS_XML_NS);
|
CMS.CMS_XML_NS);
|
||||||
edit.addAttribute("action", EDIT);
|
edit.addAttribute("action", EDIT);
|
||||||
|
|
@ -154,6 +153,7 @@ public class NotesDisplay extends SimpleComponent {
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new UncheckedWrapperException(ex);
|
throw new UncheckedWrapperException(ex);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ps.clearControlEvent();
|
ps.clearControlEvent();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ public class NotesStep extends SecurityPropertyEditor {
|
||||||
return m_itemModel.getSelectedItem( ps );
|
return m_itemModel.getSelectedItem( ps );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void register( Page p ) {
|
public void register( Page p ) {
|
||||||
super.register( p );
|
super.register( p );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue