Coverage Report - org.kuali.student.lum.lu.ui.main.client.configuration.CurriculumHomeConfigurer
 
Classes in this File Line Coverage Branch Coverage Complexity
CurriculumHomeConfigurer
0%
0/91
0%
0/12
2.04
CurriculumHomeConfigurer$1
0%
0/6
N/A
2.04
CurriculumHomeConfigurer$2
0%
0/4
N/A
2.04
CurriculumHomeConfigurer$3
0%
0/13
0%
0/6
2.04
CurriculumHomeConfigurer$4
0%
0/7
N/A
2.04
CurriculumHomeConfigurer$5
0%
0/46
0%
0/2
2.04
CurriculumHomeConfigurer$5$1
0%
0/3
N/A
2.04
CurriculumHomeConfigurer$5$2
0%
0/5
0%
0/2
2.04
CurriculumHomeConfigurer$5$3
0%
0/5
0%
0/2
2.04
CurriculumHomeConfigurer$5$4
0%
0/10
0%
0/4
2.04
CurriculumHomeConfigurer$5$5
0%
0/10
0%
0/2
2.04
CurriculumHomeConfigurer$5$6
0%
0/10
0%
0/2
2.04
CurriculumHomeConfigurer$5$7
0%
0/22
0%
0/14
2.04
CurriculumHomeConfigurer$6
0%
0/15
0%
0/6
2.04
CurriculumHomeConfigurer$7
0%
0/6
N/A
2.04
 
 1  
 package org.kuali.student.lum.lu.ui.main.client.configuration;
 2  
 
 3  
 import java.util.List;
 4  
 
 5  
 import org.kuali.student.common.assembly.data.Metadata;
 6  
 import org.kuali.student.common.rice.StudentIdentityConstants;
 7  
 import org.kuali.student.common.ui.client.application.Application;
 8  
 import org.kuali.student.common.ui.client.application.ViewContext;
 9  
 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
 10  
 import org.kuali.student.common.ui.client.mvc.Callback;
 11  
 import org.kuali.student.common.ui.client.widgets.KSButton;
 12  
 import org.kuali.student.common.ui.client.widgets.KSCheckBox;
 13  
 import org.kuali.student.common.ui.client.widgets.KSLabel;
 14  
 import org.kuali.student.common.ui.client.widgets.KSLightBox;
 15  
 import org.kuali.student.common.ui.client.widgets.KSRadioButton;
 16  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.AbbrButton;
 17  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.AbbrButton.AbbrButtonType;
 18  
 import org.kuali.student.common.ui.client.widgets.layout.ContentBlockLayout;
 19  
 import org.kuali.student.common.ui.client.widgets.layout.LinkContentBlock;
 20  
 import org.kuali.student.common.ui.client.widgets.search.KSPicker;
 21  
 import org.kuali.student.common.ui.client.widgets.search.SearchPanel;
 22  
 import org.kuali.student.common.ui.client.widgets.search.SelectedResults;
 23  
 import org.kuali.student.common.ui.shared.IdAttributes.IdType;
 24  
 import org.kuali.student.lum.common.client.widgets.AppLocations;
 25  
 import org.kuali.student.lum.lu.ui.course.client.widgets.RecentlyViewedBlock;
 26  
 import org.kuali.student.lum.program.client.ProgramClientConstants;
 27  
 import org.kuali.student.lum.program.client.ProgramConstants;
 28  
 import org.kuali.student.lum.program.client.ProgramRegistry;
 29  
 
 30  
 import com.google.gwt.event.dom.client.ClickEvent;
 31  
 import com.google.gwt.event.dom.client.ClickHandler;
 32  
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 33  
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 34  
 import com.google.gwt.user.client.ui.Anchor;
 35  
 import com.google.gwt.user.client.ui.HorizontalPanel;
 36  
 import com.google.gwt.user.client.ui.Hyperlink;
 37  
 import com.google.gwt.user.client.ui.Label;
 38  
 import com.google.gwt.user.client.ui.VerticalPanel;
 39  
 import com.google.gwt.user.client.ui.Widget;
 40  
 
 41  0
 public class CurriculumHomeConfigurer implements CurriculumHomeConstants {
 42  
 
 43  
     protected Metadata searchMetadata;
 44  
 
 45  
     public Widget configure(Metadata searchMeta) {
 46  0
         this.searchMetadata = searchMeta;
 47  0
         ContentBlockLayout layout = new ContentBlockLayout(getMessage(CURRICULUM_MANAGEMENT));
 48  0
         layout.addContentTitleWidget(getHowToWidget());
 49  0
         layout.addContentTitleWidget(getActionListLink());
 50  
 
 51  
         //Create
 52  0
         LinkContentBlock create = new LinkContentBlock(
 53  
                 getMessage(CREATE),
 54  
                 getMessage(CREATE_DESC));
 55  0
         create.addNavLinkWidget(getMessage(CREATE_COURSE), getCreateCourseClickHandler());
 56  0
         create.addNavLinkWidget(getMessage(CREATE_PROGRAM), AppLocations.Locations.EDIT_PROGRAM.getLocation());        
 57  
 
 58  
 
 59  
         //View + Modify
 60  0
         LinkContentBlock viewModify = new LinkContentBlock(
 61  
                 getMessage(VIEW_MODIFY),
 62  
                 getMessage(VIEW_MODIFY_DESC));
 63  0
         SectionTitle courses = SectionTitle.generateH4Title(getMessage("courses"));
 64  0
         courses.addStyleName("bold");
 65  0
         viewModify.add(courses);
 66  0
         viewModify.addNavLinkWidget(getMessage(BROWSE_CATALOG), AppLocations.Locations.BROWSE_CATALOG.getLocation());
 67  0
         viewModify.add(getFindCoursesWidget());
 68  0
         viewModify.add(getFindProposalsWidget());
 69  0
         SectionTitle programs = SectionTitle.generateH4Title(getMessage("programs"));
 70  0
         programs.addStyleName("bold");
 71  0
         viewModify.add(programs);
 72  0
         viewModify.addNavLinkWidget(getMessage(BROWSE_PROGRAM), AppLocations.Locations.BROWSE_PROGRAM.getLocation());
 73  0
         viewModify.add(getFindMajorsWidget());
 74  0
         viewModify.add(getFindCoreProgramWidget());
 75  0
         viewModify.add(getFindCredentialProgramWidget());
 76  
 
 77  
         //RecentlyViewed
 78  0
         RecentlyViewedBlock recent = new RecentlyViewedBlock(
 79  
                 getMessage(RECENTLY_VIEWED),
 80  
                 getMessage(RV_DESC));
 81  0
         recent.addStyleName("recentlyViewed-block");
 82  
 
 83  
         //Tools
 84  0
         LinkContentBlock tools = new LinkContentBlock(
 85  
                 getMessage(TOOLS),
 86  
                 getMessage(TOOLS_DESC));
 87  0
         tools.addNavLinkWidget(getMessage(COURSE_SETS), AppLocations.Locations.MANAGE_CLU_SETS.getLocation());
 88  0
         tools.addNavLinkWidget(getMessage(LO_CATEGORIES), AppLocations.Locations.MANAGE_LO_CATEGORIES.getLocation());
 89  0
         tools.addNavLinkWidget(getMessage(DEP_ANALYSIS), AppLocations.Locations.DEPENDENCY_ANALYSIS.getLocation());
 90  
         
 91  
         //Coming soon
 92  0
         Label learningObjectives = new Label(getMessage(LOS));
 93  0
         learningObjectives.setTitle("Coming Soon");
 94  0
         learningObjectives.setStyleName("contentBlock-navLink-disabled");
 95  0
         tools.add(learningObjectives);
 96  
 
 97  
         //Add all blocks
 98  0
         layout.addContentBlock(create);
 99  0
         layout.addContentBlock(viewModify);
 100  0
         recent.addBlock(tools);
 101  0
         layout.addContentBlock(recent);
 102  
 
 103  0
         return layout;
 104  
     }
 105  
 
 106  
         private Widget getFindCredentialProgramWidget() {
 107  0
         Anchor anchor = createNavigationWidget(getMessage(FIND_CREDENTIALS));
 108  0
         anchor.addClickHandler(new ClickHandler() {
 109  
             @Override
 110  
             public void onClick(ClickEvent event) {
 111  0
                 ProgramRegistry.setCreateNew(true);
 112  0
                 ViewContext baccViewContext = new ViewContext();
 113  0
                 baccViewContext.setId(ProgramClientConstants.CREDENTIAL_BACCALAUREATE_PROGRAM);
 114  0
                 Application.navigate(AppLocations.Locations.VIEW_BACC_PROGRAM.getLocation(), baccViewContext);
 115  0
             }
 116  
         });
 117  0
         return anchor;
 118  
     }
 119  
 
 120  
     private Widget getFindCoreProgramWidget() {
 121  0
         Anchor anchor = createNavigationWidget(getMessage(FIND_CORES));
 122  0
         anchor.addClickHandler(new ClickHandler() {
 123  
             @Override
 124  
             public void onClick(ClickEvent event) {
 125  0
                 ProgramRegistry.setCreateNew(true);
 126  0
                 Application.navigate(AppLocations.Locations.VIEW_CORE_PROGRAM.getLocation());
 127  0
             }
 128  
         });
 129  0
         return anchor;
 130  
     }
 131  
 
 132  
 
 133  
     protected Widget getFindProposalsWidget() {
 134  
         final Widget searchWidget;
 135  0
         if (searchMetadata != null) {
 136  0
             Metadata metadata = searchMetadata.getProperties().get("findProposal");
 137  0
             searchWidget = new KSPicker(metadata.getInitialLookup(), metadata.getAdditionalLookups());
 138  0
             SearchPanel panel = ((KSPicker) searchWidget).getSearchPanel();
 139  0
             if (panel != null) {
 140  0
                 panel.setMutipleSelect(false);
 141  
             }
 142  0
             ((KSPicker) searchWidget).setAdvancedSearchCallback(new Callback<List<SelectedResults>>() {
 143  
 
 144  
                 @Override
 145  
                 public void exec(List<SelectedResults> result) {
 146  0
                         if (result != null && result.size() > 0) {
 147  0
                             SelectedResults value = result.get(0);
 148  0
                             ViewContext viewContext = new ViewContext();
 149  0
                             viewContext.setId(value.getResultRow().getId());
 150  0
                             String proposalType = value.getResultRow().getValue("proposal.resultColumn.proposalOptionalType");
 151  0
                             viewContext.setAttribute(StudentIdentityConstants.DOCUMENT_TYPE_NAME, proposalType);
 152  0
                             viewContext.setIdType(IdType.KS_KEW_OBJECT_ID);
 153  0
                             if("kuali.proposal.type.course.create.admin".equals(proposalType)){
 154  0
                                     Application.navigate(AppLocations.Locations.COURSE_ADMIN.getLocation(), viewContext);
 155  
                             }else{
 156  0
                                     Application.navigate(AppLocations.Locations.COURSE_PROPOSAL.getLocation(), viewContext);
 157  
                             }
 158  0
                             ((KSPicker) searchWidget).getSearchWindow().hide();
 159  
                         }
 160  0
                 }
 161  
             });
 162  0
         } else {
 163  0
             searchWidget = new Label(getMessage(FIND_PROPOSALS));
 164  0
             searchWidget.setStyleName("contentBlock-navLink-disabled");
 165  
         }
 166  0
         searchWidget.setStyleName("contentBlock-navLink");
 167  0
         return searchWidget;
 168  
     }
 169  
 
 170  
     protected Widget getFindCoursesWidget() {
 171  
         Widget searchWidget;
 172  0
         if (searchMetadata != null) {
 173  0
             Metadata metadata = searchMetadata.getProperties().get("findCourse");
 174  0
             searchWidget = new KSPicker(metadata.getInitialLookup(), metadata.getAdditionalLookups());
 175  0
             SearchPanel panel = ((KSPicker) searchWidget).getSearchPanel();
 176  0
             if (panel != null) {
 177  0
                 panel.setMutipleSelect(false);
 178  
             }
 179  0
             ((KSPicker) searchWidget).addValuesChangeHandler(new ValueChangeHandler<List<String>>() {
 180  
                 public void onValueChange(ValueChangeEvent<List<String>> event) {
 181  0
                     List<String> selection = event.getValue();
 182  0
                     ViewContext viewContext = new ViewContext();
 183  0
                     viewContext.setId(selection.get(0));
 184  0
                     viewContext.setIdType(IdType.OBJECT_ID);
 185  0
                     Application.navigate(AppLocations.Locations.VIEW_COURSE.getLocation(), viewContext);
 186  0
                 }
 187  
             });
 188  0
             searchWidget.setStyleName("contentBlock-navLink");
 189  0
         } else {
 190  0
             searchWidget = new Label(getMessage(FIND_COURSES));
 191  0
             searchWidget.setStyleName("contentBlock-navLink-disabled");
 192  
         }
 193  0
         return searchWidget;
 194  
     }
 195  
 
 196  
     protected ClickHandler getCreateCourseClickHandler() {
 197  0
             return new ClickHandler(){
 198  
                     
 199  
                         @Override
 200  
                         public void onClick(ClickEvent event) {
 201  
                     
 202  
                                 //Create a dialog for course selection
 203  0
                     final KSLightBox dialog = new KSLightBox(getMessage("createCourse"));
 204  0
                     VerticalPanel layout = new VerticalPanel();
 205  0
                     layout.addStyleName("ks-form-module-fields");
 206  
                     
 207  0
                     final KSButton startProposalButton = new KSButton(getMessage("startProposal"));
 208  
                     
 209  0
                     dialog.addButton(startProposalButton);
 210  0
                     Anchor cancelLink = new Anchor("Cancel");
 211  0
                     cancelLink.addClickHandler(new ClickHandler(){
 212  
                                         public void onClick(ClickEvent event) {
 213  0
                                                 dialog.hide();
 214  0
                                         }
 215  
                     });
 216  0
                     dialog.addButton(cancelLink);
 217  
                     
 218  0
                     HorizontalPanel titlePanel = new HorizontalPanel();
 219  0
                     KSLabel titleLabel = new KSLabel(getMessage("createCourseSubTitle"));
 220  0
                     titleLabel.addStyleName("bold");
 221  0
                     AbbrButton helpButton = new AbbrButton(AbbrButtonType.HELP);
 222  0
                     helpButton.setHoverHTML(getMessage("createCourseSubTitle-help"));
 223  0
                     helpButton.getHoverPopup().getElement().getStyle().setZIndex(999999);
 224  0
                     titlePanel.add(titleLabel);
 225  0
                     titlePanel.add(helpButton);
 226  
                     
 227  0
                     layout.add(titlePanel);
 228  
                     
 229  0
                     KSLabel instructionText = new KSLabel(getMessage("createCourseSubTitle-instruct"));
 230  
          
 231  0
                     layout.add(instructionText);
 232  
                     
 233  0
                     final CopyCourseSearchPanel copyCourseSearchPanel = new CopyCourseSearchPanel(searchMetadata, new Callback<Boolean>(){
 234  
                                         public void exec(Boolean result) {
 235  0
                                                 if(result){
 236  0
                                                         startProposalButton.setEnabled(true);
 237  
                                                 }else{
 238  0
                                                         startProposalButton.setEnabled(false);
 239  
                                                 }
 240  0
                                         }
 241  
                     }, getMessage("courseToCopy"), getMessage("courseInvalidValue"), new String[]{getMessage("selectByCourseCode"), getMessage("selectByCourseTitle")}, new String[]{"approvedCourses", "approvedCoursesByTitle"});
 242  
                     
 243  
 
 244  0
                     final CopyCourseSearchPanel copyProposalSearchPanel = new CopyCourseSearchPanel(searchMetadata, new Callback<Boolean>(){
 245  
                                         public void exec(Boolean result) {
 246  0
                                                 if(result){
 247  0
                                                         startProposalButton.setEnabled(true);
 248  
                                                 }else{
 249  0
                                                         startProposalButton.setEnabled(false);
 250  
                                                 }
 251  0
                                         }
 252  
                     }, getMessage("proposalToCopy"), getMessage("proposalInvalidValue"), new String[]{getMessage("selectByProposalTitle"), getMessage("selectByProposedCourse")}, new String[]{"proposedCoursesByTitle", "proposedCoursesByCode"});
 253  
                    
 254  0
                     final KSRadioButton radioOptionBlank = new KSRadioButton("createNewCreditCourseButtonGroup", getMessage("startBlankProposal"));
 255  0
                     final KSRadioButton radioOptionCopyCourse = new KSRadioButton("createNewCreditCourseButtonGroup", getMessage("copyApprovedCourse"));
 256  0
                     final KSRadioButton radioOptionCopyProposal = new KSRadioButton("createNewCreditCourseButtonGroup", getMessage("copyProposedCourse"));
 257  0
                     final KSCheckBox adminOptionCheckbox = new KSCheckBox(getMessage("useCurriculumReview"));
 258  
                     
 259  0
                     radioOptionBlank.addValueChangeHandler(new ValueChangeHandler<Boolean>(){
 260  
                                         public void onValueChange(ValueChangeEvent<Boolean> event) {
 261  0
                                                 if(event.getValue()){
 262  0
                                                         if ("admin".equals(Application.getApplicationContext().getUserId())){
 263  0
                                                     adminOptionCheckbox.setVisible(true);
 264  0
                                                     adminOptionCheckbox.setEnabled(true);
 265  0
                                                     adminOptionCheckbox.setValue(false);
 266  
                                             }
 267  0
                                                         copyCourseSearchPanel.setVisible(false);
 268  0
                                                         copyProposalSearchPanel.setVisible(false);
 269  0
                                                         startProposalButton.setEnabled(true);
 270  
                                                 }
 271  0
                                         }
 272  
                     });
 273  0
                     radioOptionBlank.setValue(true);
 274  
                     
 275  0
                     radioOptionCopyCourse.addValueChangeHandler(new ValueChangeHandler<Boolean>(){
 276  
                                         public void onValueChange(ValueChangeEvent<Boolean> event) {
 277  0
                                                 if(event.getValue()){
 278  0
                                                         copyCourseSearchPanel.setVisible(true);
 279  0
                                                         copyProposalSearchPanel.setVisible(false);
 280  0
                                                         adminOptionCheckbox.setEnabled(false);
 281  0
                                                         adminOptionCheckbox.setValue(true);
 282  0
                                                         copyCourseSearchPanel.clear();
 283  0
                                                         copyProposalSearchPanel.clear();
 284  0
                                                         startProposalButton.setEnabled(false);
 285  
                                                 }
 286  0
                                         }
 287  
                     });
 288  
                     
 289  0
                     radioOptionCopyProposal.addValueChangeHandler(new ValueChangeHandler<Boolean>(){
 290  
                                         public void onValueChange(ValueChangeEvent<Boolean> event) {
 291  0
                                                 if(event.getValue()){
 292  0
                                                         copyCourseSearchPanel.setVisible(false);
 293  0
                                                         copyProposalSearchPanel.setVisible(true);
 294  0
                                                         adminOptionCheckbox.setEnabled(false);
 295  0
                                                         adminOptionCheckbox.setValue(true);
 296  0
                                                         copyCourseSearchPanel.clear();
 297  0
                                                         copyProposalSearchPanel.clear();
 298  0
                                                         startProposalButton.setEnabled(false);
 299  
                                                 }
 300  0
                                         }
 301  
                     });
 302  
                     
 303  
                     //FIXME: This should check permissions for admin functionality rather than just admin user
 304  0
                     if ("admin".equals(Application.getApplicationContext().getUserId())){
 305  0
                             adminOptionCheckbox.setValue(false);
 306  0
                             adminOptionCheckbox.setVisible(true);
 307  
                     } else {
 308  0
                             adminOptionCheckbox.setValue(true);
 309  0
                             adminOptionCheckbox.setVisible(false);                            
 310  
                     }
 311  
                     
 312  0
                     layout.add(radioOptionBlank);
 313  0
                     layout.add(radioOptionCopyCourse);
 314  0
                     layout.add(copyCourseSearchPanel);
 315  0
                     layout.add(radioOptionCopyProposal);
 316  0
                     layout.add(copyProposalSearchPanel);
 317  0
                     layout.add(new KSLabel(""));
 318  0
                     layout.add(adminOptionCheckbox);
 319  
                     
 320  0
                     startProposalButton.addClickHandler(new ClickHandler(){
 321  
                                         public void onClick(ClickEvent event) {
 322  0
                                                 if(radioOptionBlank.getValue() && adminOptionCheckbox.getValue()){
 323  0
                                                         Application.navigate(AppLocations.Locations.COURSE_PROPOSAL.getLocation());
 324  0
                                                 } else if (radioOptionBlank.getValue()){
 325  0
                                                         Application.navigate(AppLocations.Locations.COURSE_ADMIN.getLocation());
 326  0
                                                 }else if(radioOptionCopyCourse.getValue()){
 327  0
                                     ViewContext viewContext = new ViewContext();
 328  0
                                     viewContext.setId(copyCourseSearchPanel.getValue());
 329  0
                                     viewContext.setIdType(IdType.COPY_OF_OBJECT_ID);
 330  0
                                     if (adminOptionCheckbox.getValue()){
 331  0
                                             Application.navigate(AppLocations.Locations.COURSE_PROPOSAL.getLocation(), viewContext);
 332  
                                     } else {
 333  0
                                             Application.navigate(AppLocations.Locations.COURSE_ADMIN.getLocation(), viewContext);
 334  
                                     }
 335  0
                                                 }else if(radioOptionCopyProposal.getValue()){
 336  0
                                     ViewContext viewContext = new ViewContext();
 337  0
                                     viewContext.setId(copyProposalSearchPanel.getValue());
 338  0
                                     viewContext.setIdType(IdType.COPY_OF_KS_KEW_OBJECT_ID);
 339  0
                                     viewContext.getAttributes().remove(StudentIdentityConstants.DOCUMENT_TYPE_NAME);
 340  0
                                     if (adminOptionCheckbox.getValue()){
 341  0
                                             Application.navigate(AppLocations.Locations.COURSE_PROPOSAL.getLocation(), viewContext);
 342  
                                     } else {
 343  0
                                             Application.navigate(AppLocations.Locations.COURSE_ADMIN.getLocation(), viewContext);
 344  
                                     }
 345  
                                                 }
 346  0
                                                 dialog.hide();
 347  0
                                         }
 348  
                                 });
 349  
                     
 350  
                     
 351  0
                     dialog.setWidget(layout);
 352  0
                     dialog.show();                        
 353  0
                     }
 354  
                    };
 355  
     }
 356  
     
 357  
     protected Widget getFindMajorsWidget() {
 358  
         final Widget searchWidget;
 359  0
         if (searchMetadata != null) {
 360  0
             Metadata metadata = searchMetadata.getProperties().get("findMajor");
 361  0
             searchWidget = new KSPicker(metadata.getInitialLookup(), metadata.getAdditionalLookups());
 362  0
             SearchPanel panel = ((KSPicker) searchWidget).getSearchPanel();
 363  0
             if (panel != null) {
 364  0
                 panel.setMutipleSelect(false);
 365  
             }
 366  0
             ((KSPicker) searchWidget).setAdvancedSearchCallback(new Callback<List<SelectedResults>>() {
 367  
 
 368  
                 @Override
 369  
                 public void exec(List<SelectedResults> result) {
 370  0
                     SelectedResults value = result.get(0);
 371  0
                     ViewContext viewContext = new ViewContext();
 372  0
                     viewContext.setId(value.getResultRow().getId());
 373  0
                     String cluType = value.getResultRow().getValue("lu.resultColumn.luOptionalType");
 374  0
                     if (cluType != null) {
 375  0
                         viewContext.setAttribute(ProgramConstants.TYPE, cluType);
 376  
                     }
 377  0
                     String variationId = value.getResultRow().getValue("lu.resultColumn.variationId");
 378  0
                     if (variationId != null && !variationId.trim().isEmpty()) {
 379  0
                         viewContext.setAttribute(ProgramConstants.VARIATION_ID, variationId);
 380  
                     }
 381  0
                     viewContext.setIdType(IdType.OBJECT_ID);
 382  0
                     ProgramRegistry.setCreateNew(true);
 383  0
                     Application.navigate(AppLocations.Locations.VIEW_PROGRAM.getLocation(), viewContext);
 384  0
                     ((KSPicker) searchWidget).getSearchWindow().hide();
 385  0
                 }
 386  
             });
 387  
 
 388  0
         } else {
 389  0
             searchWidget = new Label(getMessage(FIND_MAJORS));
 390  0
             searchWidget.setStyleName("contentBlock-navLink-disabled");
 391  
         }
 392  0
         searchWidget.setStyleName("contentBlock-navLink");
 393  0
         return searchWidget;
 394  
     }
 395  
 
 396  
     protected Widget getHowToWidget() {
 397  0
         Anchor widget = new Anchor(getMessage(HOW_TO));
 398  0
         widget.addClickHandler(new ClickHandler() {
 399  
 
 400  
             @Override
 401  
             public void onClick(ClickEvent event) {
 402  0
                 final KSLightBox pop = new KSLightBox();
 403  0
                 pop.setWidget(new CurriculumHomeHelpTable());
 404  0
                 pop.setSize(800, 600);
 405  0
                 pop.show();
 406  0
             }
 407  
         });
 408  0
         widget.setStyleName("contentBlock-navLink");
 409  0
         return widget;
 410  
     }
 411  
 
 412  
     protected Widget getActionListLink() {
 413  0
         Hyperlink widget = new Hyperlink(getMessage(ACTIONLIST), AppLocations.Locations.HOME.getLocation());
 414  0
         widget.setStyleName("contentBlock-navLink");
 415  0
         return widget;
 416  
     }
 417  
 
 418  
     private String getMessage(String key) {
 419  0
         return Application.getApplicationContext().getMessage(key);
 420  
     }
 421  
 
 422  
     private Anchor createNavigationWidget(String title) {
 423  0
         Anchor anchor = new Anchor(title);
 424  0
         anchor.addStyleName("contentBlock-navLink");
 425  0
         return anchor;
 426  
     }
 427  
 
 428  
 }