Set current version as Yes/No
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@144457 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e5b5e6fc14
commit
38dc84a74b
|
@ -281,7 +281,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
//ColumnConfig deleteDate = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEDATE.toString(), "Deleted Date", 90);
|
||||
//deleteDate.setDateTimeFormat(DateTimeFormat.getFormat("dd MMM hh:mm aaa yyyy"));
|
||||
ColumnConfig user = createSortableColumnConfig(FileVersionModel.USER_VERSIONING, "User", 130);
|
||||
ColumnConfig currVersion = createSortableColumnConfig(FileVersionModel.IS_CURRENT_VERSION, "Current Version", 80);
|
||||
ColumnConfig currVersion = createSortableColumnConfig(FileVersionModel.IS_CURRENT_VERSION, "Current Version", 75);
|
||||
|
||||
ColumnModel cm = new ColumnModel(Arrays.asList(name, created, user, currVersion));
|
||||
|
||||
|
@ -311,7 +311,6 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
String color = "black";
|
||||
|
||||
if(val!=null && isCurrVersion != null && isCurrVersion){
|
||||
// color = "#EEC900";
|
||||
return "<span qtitle='" + columnModel.getColumnById(property).getHeader() + "' qtip='" + val + "' style='font-weight: bold;color:" + color + "'>" + val + "</span>";
|
||||
}else{
|
||||
if(val==null)
|
||||
|
@ -325,16 +324,12 @@ public class VersioningInfoContainer extends LayoutContainer {
|
|||
@Override
|
||||
public String render(FileVersionModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<FileVersionModel> store, Grid<FileVersionModel> grid) {
|
||||
Boolean isCurrVersion = model.isCurrentVersion();
|
||||
String val = model.get(property);
|
||||
String color = "black";
|
||||
//String val = model.get(property);
|
||||
|
||||
if(val!=null && isCurrVersion != null && isCurrVersion){
|
||||
// color = "#EEC900";
|
||||
return "<span qtitle='This is current version' qtip='" + val + ">Yes</span>";
|
||||
if(isCurrVersion != null && isCurrVersion){
|
||||
return "<span>Yes</span>";
|
||||
}else{
|
||||
if(val==null)
|
||||
val = "";
|
||||
return "<span qtitle='This is a previous version' qtip='" + val + "' style='color:" + color + "'>No</span>";
|
||||
return "<span>No</span>";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue