/*
 * Copyright (C) 2010 BloatIt.
 *
 * This file is part of BloatIt.
 *
 * BloatIt is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * BloatIt is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with BloatIt. If not, see <http://www.gnu.org/licenses/>.
 */

package com.bloatit.web.pages;

import com.bloatit.web.htmlrenderer.HtmlTools;
import com.bloatit.web.htmlrenderer.htmlcomponent.HtmlComponent;
import com.bloatit.web.htmlrenderer.htmlcomponent.HtmlText;
import com.bloatit.web.htmlrenderer.htmlcomponent.HtmlTitle;
import com.bloatit.web.server.Page;
import com.bloatit.web.server.Session;
import java.util.HashMap;
import java.util.Map;


public class MembersListPage extends Page {

    public MembersListPage(Session session, Map<String, String> parameters) {
        super(session, parameters);
    }

    public MembersListPage(Session session) {
        this(session, new HashMap<String, String>());
    }

    @Override
    protected HtmlComponent generateContent() {

        HtmlTitle pageTitle = new HtmlTitle("Members list", "");
        
        return pageTitle;

    }

    @Override
    public String getCode() {
        return "members_list";
    }

    @Override
    protected String getTitle() {
        return "Members list";
    }
}
@@ -753,16 +753,93 @@
 pages;%0A%0A
+import com.bloatit.framework.MemberManager;%0Aimport com.bloatit.model.Member;%0A
 import c
@@ -942,16 +942,140 @@
 ponent;%0A
+import com.bloatit.web.htmlrenderer.htmlcomponent.HtmlList;%0Aimport com.bloatit.web.htmlrenderer.htmlcomponent.HtmlListItem;%0A
 import c
@@ -1288,16 +1288,39 @@
 ashMap;%0A
+import java.util.List;%0A
 import j
@@ -1736,24 +1736,25 @@
 %22, %22%22);%0A
+%0A
         
 %0A       
@@ -1745,16 +1745,432 @@
         
+List%3CMember%3E memberList = MemberManager.getMemberList();%0A%0A        HtmlList htmlMemberList = new HtmlList();%0A        pageTitle.add(htmlMemberList);%0A%0A        for(Member member:memberList) %7B%0A            %0A            HtmlListItem item = new HtmlListItem(member.getFullName()+ %22%3Cspan class=%5C%22karma%5C%22%3E%22+ HtmlTools.compressKarma(member.getKarma()) + %22%3C/span%3E%22);%0A            htmlMemberList.addItem(item);%0A        %7D%0A        %0A
 %0A       

Generate the MemberListPage content