Skip to content

Commit

Permalink
Adding experiment to cart and services are temporarily hidden (not co…
Browse files Browse the repository at this point in the history
…mpleted yet).
  • Loading branch information
stebjan committed May 15, 2014
1 parent eb952b7 commit 8e3939b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@
******************************************************************************/
package cz.zcu.kiv.eegdatabase.wui.components.page;

import java.io.Serializable;

import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import org.apache.wicket.util.string.StringValue;

import cz.zcu.kiv.eegdatabase.wui.app.EEGDataBaseApplication;
import cz.zcu.kiv.eegdatabase.wui.app.session.EEGDataBaseSession;
import cz.zcu.kiv.eegdatabase.wui.components.feedback.BaseFeedbackMessagePanel;
Expand All @@ -42,6 +31,16 @@
import cz.zcu.kiv.eegdatabase.wui.ui.search.MenuSearchPanel;
import cz.zcu.kiv.eegdatabase.wui.ui.security.RegistrationPage;
import cz.zcu.kiv.eegdatabase.wui.ui.shoppingCart.ShoppingCartPage;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import org.apache.wicket.util.string.StringValue;

import java.io.Serializable;

/**
* MenuPage for EEGDatabase portal, added header section with information about logged user,
Expand Down Expand Up @@ -96,7 +95,8 @@ public Serializable getObject(){

}
cart.add(new Label("cartLabel", cartLabel));
cart.setVisibilityAllowed(signedIn);
//cart.setVisibilityAllowed(signedIn); TODO set me visible
cart.setVisible(false);
add(cart);

Link<Void> link = new Link<Void>("logout") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ private List<? extends IColumn<Experiment, String>> createListColumns() {

columns.add(new PropertyColumn<Experiment, String>(ResourceUtils.getModel("dataTable.heading.services"), null, null) {

@Override
@Override // TODO make me visible.
public void populateItem(Item<ICellPopulator<Experiment>> item, String componentId, IModel<Experiment> rowModel) {
item.add(new ViewLinkPanel(componentId, MethodListPage.class, "experimentId", rowModel, ResourceUtils.getModel("menuItem.services")));
item.add(new ViewLinkPanel(componentId, MethodListPage.class, "experimentId", rowModel, ResourceUtils.getModel("menuItem.services")).setVisible(false));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ private List<? extends IColumn<Experiment, String>> createListColumns() {
columns.add(new PropertyColumn<Experiment, String>(ResourceUtils.getModel("dataTable.heading.gender"), "personBySubjectPersonId.gender", "personBySubjectPersonId.gender"));
columns.add(new TimestampPropertyColumn<Experiment, String>(ResourceUtils.getModel("dataTable.heading.yearOfBirth"), "personBySubjectPersonId.dateOfBirth",
"personBySubjectPersonId.dateOfBirth", "yyyy"));
// TODO service page missing.

columns.add(new PropertyColumn<Experiment, String>(ResourceUtils.getModel("dataTable.heading.services"), null, null) {

@Override
@Override // TODO make me visible.
public void populateItem(Item<ICellPopulator<Experiment>> item, String componentId, IModel<Experiment> rowModel) {
item.add(new ViewLinkPanel(componentId, MethodListPage.class, "experimentId", rowModel, ResourceUtils.getModel("menuItem.services")));
item.add(new ViewLinkPanel(componentId, MethodListPage.class, "experimentId", rowModel, ResourceUtils.getModel("menuItem.services")).setVisible(false));
}
});
columns.add(new PropertyColumn<Experiment, String>(ResourceUtils.getModel("dataTable.heading.detail"), null, null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public BuyLinkPanel(String id, IModel<Experiment> model) {
public void onClick() {
EEGDataBaseSession.get().getShoppingCart().addToCart(experiment);
}
}.add(new Label("label", ResourceUtils.getModel("link.addToCart")))
.setVisibilityAllowed(!EEGDataBaseSession.get().getShoppingCart().isInCart(experiment)));
}.add(new Label("label", ResourceUtils.getModel("link.addToCart"))).setVisible(false)); //TODO set me visible
// .setVisibilityAllowed(!EEGDataBaseSession.get().getShoppingCart().isInCart(experiment)));
// "Add to Cart" links are rendered only for experiments that haven't been places in the cart yet.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ button.submitDisable= Submitting, please wait...
button.visualization=Visualization
currency.euro=\u20ac
dataTable.heading.articleTitle=Article title
dataTable.heading.buy=Buy
dataTable.heading.buy=
dataTable.heading.count=Count
dataTable.heading.date=Date
dataTable.heading.remove=Remove
Expand Down Expand Up @@ -288,7 +288,7 @@ dataTable.heading.compensation=Compensation
dataTable.heading.rejectCondition=Reject Condition
dataTable.heading.number=No.
dataTable.heading.detail=Detail
dataTable.heading.services=Services
dataTable.heading.services=
dataTable.heading.link=Link
dataTable.heading.measurationAdditionalParamsDataType=Data type
dataTable.heading.measurationAdditionalParamsId=ID
Expand Down

0 comments on commit 8e3939b

Please sign in to comment.