示例#1
0
  @Override
  protected void doLayout() {
    beginDoLayout(sourceTemplate);
    // ------
    ; // line 1
    p("\n"); // line 3
    p("\n" + "\n"); // line 5
    if (allPost.size() > 0) { // line 8
      p("	<p></p>\n" + "	"); // line 8
      for (Post p : allPost) { // line 10
        p("	    "); // line 10
        final Display _Display1 = new Display(getOut());
        _Display1.setActionRunners(getActionRunners()).setOut(getOut());
        _Display1.render( // line 11
            new Display.DoBody<String>() { // line 11
              public void render(final String title) { // line 11
                // line 11
                p("			<p>The real title is: "); // line 11
                p(title); // line 12
                p(";</p>\n" + "	    "); // line 12
              }

              StringBuilder oriBuffer;

              @Override
              public void setBuffer(StringBuilder sb) {
                oriBuffer = getOut();
                setOut(sb);
              }

              @Override
              public void resetBuffer() {
                setOut(oriBuffer);
              }
            },
            named("post", p),
            named("as", "home")); // line 11
        p("	"); // line 13
      } // line 14
    } else { // line 15
      p("	<p>There is no post at this moment</p>\n"); // line 15
    } // line 17
    p("\n"); // line 17
    final Tag2 _Tag22 = new Tag2(getOut());
    _Tag22.setActionRunners(getActionRunners()).setOut(getOut());
    _Tag22.render(named("msg", blogTitle), named("age", 1000)); // line 19// line 19
    p("\n" + "<p>end of it</p>"); // line 19

    endDoLayout(sourceTemplate);
  }
  @Override
  protected void doLayout() {
    beginDoLayout(sourceTemplate);
    ; // line 1, japidviews\AdminController\flashPurchaseList.html
    // line 6, japidviews\AdminController\flashPurchaseList.html
    // line 7, japidviews\AdminController\flashPurchaseList.html
    p(
        "<div class=\"navbar-inner\">\n"
            + "</div>\n"
            + "<div class=\"container\">\n"
            + "	<!-- 左菜单 -->\n"
            + "	"); // line 11, japidviews\AdminController\flashPurchaseList.html
    new leftMenusTag(flashPurchaseList.this)
        .render(); // line 16, japidviews\AdminController\flashPurchaseList.html// line 16,
                   // japidviews\AdminController\flashPurchaseList.html
    p(
        "    	<!-- 主内容 -->\n"
            + "		  <div class=\"content\" id=\"content\">\n"
            + "            <!-- 标题 -->\n"
            + "            <h3 class=\"title add-commodity-title\">活动列表</h3>\n"
            + "			"); // line 16, japidviews\AdminController\flashPurchaseList.html
    p(
        "            <!-- table -->\n"
            + "            <table class=\"table\">\n"
            + "                <tr>\n"
            + "                    <th>活动名称</th>\n"
            + "                    <th>开始时间</th>\n"
            + "                    <th>结束时间</th>\n"
            + "                    <th class=\"handle-w1\">操作</th>\n"
            + "                </tr>\n"
            + "                "); // line 24, japidviews\AdminController\flashPurchaseList.html
    if (!announcementList.isEmpty()) { // line 33, japidviews\AdminController\flashPurchaseList.html
      for (Announcements announcements :
          announcementList) { // line 34, japidviews\AdminController\flashPurchaseList.html
        p(
            "                	<tr>\n"
                + "                    <td>"); // line 34,
                                               // japidviews\AdminController\flashPurchaseList.html
        p(announcements.title); // line 36, japidviews\AdminController\flashPurchaseList.html
        p(
            "</td>\n"
                + "                    <td>"); // line 36,
                                               // japidviews\AdminController\flashPurchaseList.html
        p(announcements.startTime); // line 37, japidviews\AdminController\flashPurchaseList.html
        p(
            "</td>\n"
                + "                    <td>"); // line 37,
                                               // japidviews\AdminController\flashPurchaseList.html
        p(announcements.endTime); // line 38, japidviews\AdminController\flashPurchaseList.html
        p(
            "</td>\n"
                + "                    <td>\n"
                + "                    	<a id=\"preview\" href=\""); // line 38,
                                                                     // japidviews\AdminController\flashPurchaseList.html
        p(
            lookup(
                "AdminController.preview",
                announcements.id)); // line 40, japidviews\AdminController\flashPurchaseList.html
        p(
            "\" class=\"defaultBtn btn-sm btn-green\">预览</a>\n"
                + "                        <a id=\"del\" href=\""); // line 40,
                                                                    // japidviews\AdminController\flashPurchaseList.html
        p(
            lookup(
                "AdminController.deleteFastGood",
                announcements.id)); // line 41, japidviews\AdminController\flashPurchaseList.html
        p(
            "\" class=\"defaultBtn btn-sm btn-red\">删除</a>\n"
                + "                    </td>\n"
                + "                </tr>\n"
                + "                "); // line 41, japidviews\AdminController\flashPurchaseList.html
      } // line 44, japidviews\AdminController\flashPurchaseList.html
    } // line 45, japidviews\AdminController\flashPurchaseList.html
    p(
        "            </table>\n"
            + "            "); // line 45, japidviews\AdminController\flashPurchaseList.html
    new pagination(flashPurchaseList.this)
        .render(
            getUrl(),
            "page",
            currentPage,
            totalPage,
            null); // line 47, japidviews\AdminController\flashPurchaseList.html// line 47,
                   // japidviews\AdminController\flashPurchaseList.html
    // line 48, japidviews\AdminController\flashPurchaseList.html
    p(
        "            <!-- h20 -->\n"
            + "            <div class=\"h20\"></div>\n"
            + "		</div>\n"
            + "\n"
            + "    </div>\n"
            + "</body>\n"
            + "</html>"); // line 50, japidviews\AdminController\flashPurchaseList.html

    endDoLayout(sourceTemplate);
  }