Autoren von Publikationen ließen sich nicht entfernen (Ticket #1449)
git-svn-id: https://svn.libreccm.org/ccm/trunk@1965 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
6273224fb6
commit
7367e90b05
|
|
@ -234,7 +234,7 @@ public class PublicationBundle extends ContentBundle {
|
||||||
public void removeAuthor(final GenericPerson author) {
|
public void removeAuthor(final GenericPerson author) {
|
||||||
Assert.exists(author, GenericPerson.class);
|
Assert.exists(author, GenericPerson.class);
|
||||||
|
|
||||||
remove(AUTHORS, author);
|
remove(AUTHORS, author.getContentBundle());
|
||||||
|
|
||||||
updateAuthorsStr();
|
updateAuthorsStr();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ public class PublicationAuthorsTable
|
||||||
(Publication) m_itemModel.getSelectedObject(state);
|
(Publication) m_itemModel.getSelectedObject(state);
|
||||||
return new PublicationAuthorsTableModel(table, state, publication);
|
return new PublicationAuthorsTableModel(table, state, publication);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PublicationAuthorsTableModel implements TableModel {
|
private class PublicationAuthorsTableModel implements TableModel {
|
||||||
|
|
@ -207,6 +208,7 @@ public class PublicationAuthorsTable
|
||||||
public Object getKeyAt(int columnIndex) {
|
public Object getKeyAt(int columnIndex) {
|
||||||
return m_author.getID();
|
return m_author.getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class EditCellRenderer
|
private class EditCellRenderer
|
||||||
|
|
@ -267,6 +269,7 @@ public class PublicationAuthorsTable
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class EditAssocCellRenderer
|
private class EditAssocCellRenderer
|
||||||
|
|
@ -282,7 +285,7 @@ public class PublicationAuthorsTable
|
||||||
int row,
|
int row,
|
||||||
int col) {
|
int col) {
|
||||||
SecurityManager securityManager =
|
SecurityManager securityManager =
|
||||||
CMS.getSecurityManager(state);
|
CMS.getSecurityManager(state);
|
||||||
Publication publication = (Publication) m_itemModel.
|
Publication publication = (Publication) m_itemModel.
|
||||||
getSelectedObject(state);
|
getSelectedObject(state);
|
||||||
|
|
||||||
|
|
@ -299,6 +302,7 @@ public class PublicationAuthorsTable
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DeleteCellRenderer
|
private class DeleteCellRenderer
|
||||||
|
|
@ -335,6 +339,7 @@ public class PublicationAuthorsTable
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class UpCellRenderer
|
private class UpCellRenderer
|
||||||
|
|
@ -360,6 +365,7 @@ public class PublicationAuthorsTable
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DownCellRenderer
|
private class DownCellRenderer
|
||||||
|
|
@ -390,6 +396,7 @@ public class PublicationAuthorsTable
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -398,20 +405,17 @@ public class PublicationAuthorsTable
|
||||||
|
|
||||||
s_log.info("cellSelected!");
|
s_log.info("cellSelected!");
|
||||||
|
|
||||||
GenericPerson author =
|
GenericPerson author = new GenericPerson(new BigDecimal(event.getRowKey().toString()));
|
||||||
new GenericPerson(new BigDecimal(event.getRowKey().
|
|
||||||
toString()));
|
|
||||||
|
|
||||||
Publication publication = (Publication) m_itemModel.getSelectedObject(
|
Publication publication = (Publication) m_itemModel.getSelectedObject(state);
|
||||||
state);
|
|
||||||
|
|
||||||
AuthorshipCollection authors = publication.getAuthors();
|
AuthorshipCollection authors = publication.getAuthors();
|
||||||
|
|
||||||
TableColumn column = getColumnModel().get(event.getColumn().intValue());
|
TableColumn column = getColumnModel().get(event.getColumn().intValue());
|
||||||
|
|
||||||
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
|
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
|
||||||
} else if (column.getHeaderKey().toString().equals(
|
//Nothing
|
||||||
TABLE_COL_EDIT_ASSOC)) {
|
} else if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT_ASSOC)) {
|
||||||
|
|
||||||
while (authors.next()) {
|
while (authors.next()) {
|
||||||
if (authors.getAuthor().equals(author)) {
|
if (authors.getAuthor().equals(author)) {
|
||||||
|
|
@ -442,4 +446,5 @@ public class PublicationAuthorsTable
|
||||||
public void headSelected(TableActionEvent event) {
|
public void headSelected(TableActionEvent event) {
|
||||||
//Nothing to do here.
|
//Nothing to do here.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue