// Path: web/src/main/java/com/mysticcoders/mysticpaste/web/components/google/TagExternalLink.java
// public class TagExternalLink extends ExternalLink {
// 
//     private String prefix = "/outbound/";
//     private String suffix = "";
// 
//     public TagExternalLink(String id, String href, String label) {
//         super(id, href, label);
//     }
// 
//     public TagExternalLink(String id, String href) {
//         super(id, href);
//     }
// 
//     public TagExternalLink(String id, IModel<String> href, IModel<String> label) {
//         super(id, href, label);
//     }
// 
//     public TagExternalLink(String id, IModel<String> href) {
//         super(id, href);
//     }
// 
//     /**
//      * Returns the prefix to place in the pageTracker tagging url
//      *
//      * @return prefix of the external link
//      */
//     protected String getPrefix() {
//         return prefix;
//     }
// 
//     /**
//      * Returns the suffix to place after the pageTracker tagging url
//      *
//      * @return suffix of the external link
//      */
//     protected String getSuffix() {
//         return suffix;
//     }
// 
// 	/**
// 	 * Processes and adds the Google Tracking code to our external link
// 	 *
// 	 * @param tag
// 	 *            Tag to modify
// 	 * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
// 	 */
//     @Override
//     protected void onComponentTag(final ComponentTag tag) {
//         super.onComponentTag(tag);
// 
//         Object hrefValue = getDefaultModelObject();
// 
//         StringBuffer pageTrackerCode = new StringBuffer("pageTracker._trackPageView('");
//         pageTrackerCode.append(getPrefix());
//         pageTrackerCode.append(hrefValue);
//         pageTrackerCode.append(getSuffix());
//         pageTrackerCode.append("');");
// 
//         pageTrackerCode.append(tag.getAttribute("onclick") != null ? tag.getAttribute("onclick") : "");
// 
//         tag.put("onclick", pageTrackerCode.toString());
//     }
// }


import com.mysticcoders.mysticpaste.web.components.google.TagExternalLink;
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.panel.Panel;
import org.apache.wicket.model.AbstractReadOnlyModel;
import java.util.Calendar;
package com.mysticcoders.mysticpaste.web.pages;



/**
 * Created with IntelliJ IDEA.
 * User: kinabalu
 * Date: 11/11/12
 * Time: 1:50 PM
 * To change this template use File | Settings | File Templates.
 */
public class Footer extends Panel {

    /**
     * Construct.
     *
     * @param markupId The components markup id.
     */
    public Footer(String markupId) {
        super(markupId);

        AbstractReadOnlyModel<String> dateModel = new AbstractReadOnlyModel<String>() {
            public String getObject() {
                Calendar cal = Calendar.getInstance();
                return "" + cal.get(Calendar.YEAR);
            }
        };

        add(new Label("latestYear", dateModel));

        add(new ExternalLink("sourceLink", "http://github.com/kinabalu/mysticpaste/"));

// Path: web/src/main/java/com/mysticcoders/mysticpaste/web/components/google/TagExternalLink.java
// public class TagExternalLink extends ExternalLink {
// 
//     private String prefix = "/outbound/";
//     private String suffix = "";
// 
//     public TagExternalLink(String id, String href, String label) {
//         super(id, href, label);
//     }
// 
//     public TagExternalLink(String id, String href) {
//         super(id, href);
//     }
// 
//     public TagExternalLink(String id, IModel<String> href, IModel<String> label) {
//         super(id, href, label);
//     }
// 
//     public TagExternalLink(String id, IModel<String> href) {
//         super(id, href);
//     }
// 
//     /**
//      * Returns the prefix to place in the pageTracker tagging url
//      *
//      * @return prefix of the external link
//      */
//     protected String getPrefix() {
//         return prefix;
//     }
// 
//     /**
//      * Returns the suffix to place after the pageTracker tagging url
//      *
//      * @return suffix of the external link
//      */
//     protected String getSuffix() {
//         return suffix;
//     }
// 
// 	/**
// 	 * Processes and adds the Google Tracking code to our external link
// 	 *
// 	 * @param tag
// 	 *            Tag to modify
// 	 * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
// 	 */
//     @Override
//     protected void onComponentTag(final ComponentTag tag) {
//         super.onComponentTag(tag);
// 
//         Object hrefValue = getDefaultModelObject();
// 
//         StringBuffer pageTrackerCode = new StringBuffer("pageTracker._trackPageView('");
//         pageTrackerCode.append(getPrefix());
//         pageTrackerCode.append(hrefValue);
//         pageTrackerCode.append(getSuffix());
//         pageTrackerCode.append("');");
// 
//         pageTrackerCode.append(tag.getAttribute("onclick") != null ? tag.getAttribute("onclick") : "");
// 
//         tag.put("onclick", pageTrackerCode.toString());
//     }
// }


// Path: web/src/main/java/com/mysticcoders/mysticpaste/web/pages/Footer.java
import com.mysticcoders.mysticpaste.web.components.google.TagExternalLink;
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.panel.Panel;
import org.apache.wicket.model.AbstractReadOnlyModel;
import java.util.Calendar;

package com.mysticcoders.mysticpaste.web.pages;



/**
 * Created with IntelliJ IDEA.
 * User: kinabalu
 * Date: 11/11/12
 * Time: 1:50 PM
 * To change this template use File | Settings | File Templates.
 */
public class Footer extends Panel {

    /**
     * Construct.
     *
     * @param markupId The components markup id.
     */
    public Footer(String markupId) {
        super(markupId);

        AbstractReadOnlyModel<String> dateModel = new AbstractReadOnlyModel<String>() {
            public String getObject() {
                Calendar cal = Calendar.getInstance();
                return "" + cal.get(Calendar.YEAR);
            }
        };

        add(new Label("latestYear", dateModel));

        add(new ExternalLink("sourceLink", "http://github.com/kinabalu/mysticpaste/"));

        add(new TagExternalLink("blogLink", "http://www.mysticcoders.com/blog"));