<%@ include file="/WEB-INF/jspf/stcontext.jspf" %><%-- setup 'ctx' --%><% String helpLink = ctx.getString("helpLink"); String helpName = ctx.getString("helpName"); %>
<%= SurveyMain.GENERAL_HELP_NAME %> <% ctx.println(""); String doWhat = ctx.field(SurveyMain.QUERY_DO); if(ctx.session.user == null) { ctx.println("
"); %><%@ include file="/WEB-INF/tmpl/small_login.jsp" %><% ctx.println("
"); String curSetting = ctx.getEffectiveCoverageLevel(); if(curSetting!=null && !curSetting.equals(WebContext.COVLEV_RECOMMENDED)) { ctx.println(""); } if(!(ctx.hasField("xpath")||ctx.hasField("forum")) && ( ctx.hasField(SurveyMain.QUERY_LOCALE) || ctx.field(SurveyMain.QUERY_DO).equals("disputed"))) { WebContext subCtx = new WebContext(ctx); for(String field : SurveyMain.REDO_FIELD_LIST) { if(ctx.hasField(field)) { subCtx.addQuery(field, ctx.field(field)); } } // Some code referencing non-existent functions has been commented out here. /* if(ctx.getLocale()!=null) { subCtx.showCoverageSettingForLocale(); } else { subCtx.showCoverageSetting(); } */ } else { ctx.print(" Coverage Level: "+curSetting+""); } if(curSetting!=null && !curSetting.equals(WebContext.COVLEV_RECOMMENDED)) { ctx.println(""); } ctx.print(" | "); SurveyMain.printMenu(ctx, doWhat, "options", "Manage", SurveyMain.QUERY_DO); } else { boolean haveCookies = (ctx.getCookie(SurveyMain.QUERY_EMAIL)!=null&&ctx.getCookie(SurveyMain.QUERY_PASSWORD)!=null); ctx.println("<"+ctx.session.user.email + "> "+ctx.session.user.name + " (" + ctx.session.user.org + ") "); if(!haveCookies && !ctx.hasField(SurveyMain.QUERY_SAVE_COOKIE)) { ctx.println(" Log me in automatically next time"); } ctx.print(" | "); String cookieMessage = haveCookies?"":""; ctx.println("Logout"+cookieMessage+" | "); // A non-existent function ctx.getCoverageSetting has been replaced here by "unknown". String curSetting = "unknown"; // ctx.getCoverageSetting(); if(!(ctx.hasField("xpath")||ctx.hasField("forum")) && ( ctx.hasField(SurveyMain.QUERY_LOCALE) || ctx.field(SurveyMain.QUERY_DO).equals("disputed"))) { // TODO: is this code ever run? Or is it dead code, including SurveyForum.forumLink? if(!curSetting.equals(WebContext.COVLEV_RECOMMENDED)) { ctx.println(""); } WebContext subCtx = new WebContext(ctx); for(String field : SurveyMain.REDO_FIELD_LIST) { if(ctx.hasField(field)) { subCtx.addQuery(field, ctx.field(field)); } } // Some code referencing non-existent functions has been commented out here. /* if(ctx.hasField(SurveyMain.QUERY_LOCALE)) { subCtx.showCoverageSettingForLocale(); } else { subCtx.showCoverageSetting(); } */ if(!curSetting.equals(WebContext.COVLEV_RECOMMENDED)) { ctx.println(""); } if(ctx.getLocale()!=null) { String forum = ctx.getLocale().getLanguage(); %><%=SurveyForum.forumLink(subCtx,forum)%><% } } else { ctx.print(" Coverage: "+curSetting+""); } /* * It's possible to reach here, for example by going to http://localhost:8080/cldr-apps/survey?do=list * after logging in as admin */ ctx.print(" | "); // Some code referencing non-existent functions has been commented out here. /* if(ctx.session != null && ctx.session.user != null && UserRegistry.userIsTC(ctx.session.user) && ctx.sm.getSTFactory().haveFlags()) { ctx.println(ctx.iconHtml("flag", "(flagged items")); } */ ctx.sm.printMenu(ctx, doWhat, "options", "Manage", SurveyMain.QUERY_DO); if(UserRegistry.userIsAdmin(ctx.session.user)) { ctx.println("| [Admin Panel]"); if(ctx.session.user.id == 1) { ctx.println(" | [Raw SQL]"); } } } ctx.println("
"); ctx.flush(); %>