Exemplo n.º 1
0
        private static HtmlExpressionBase AltOxiteDefaultPartialBeforeEachItem(object item, int index, int total)
        {
            var expr = new GenericOpenTagExpression("li");

            if (index == 0)
            {
                expr.Class("first");
            }
            if (index >= (total - 1))
            {
                expr.Class("last");
            }

            if (item is CommentDisplay)
            {
                if (index % 2 != 0)
                {
                    expr.Class("odd");
                }

                var comment = (CommentDisplay)item;
                if (comment.User != null)
                {
                    expr.Class(!comment.User.IsAuthenticated ? "anon" : comment.User.ID == comment.Post.User.ID ? "author" : "user");
                }
            }

            return(expr);
        }
Exemplo n.º 2
0
        private static HtmlExpressionBase AltOxiteDefaultPartialHeader(object itemList, int totalCount)
        {
            var expr = new GenericOpenTagExpression("ul");

            if (itemList is IEnumerable <PostDisplay> )
            {
                expr.Class("posts");
            }
            if (itemList is IEnumerable <TagDisplay> )
            {
                expr.Class("tags");
            }
            if (itemList is IEnumerable <CommentDisplay> )
            {
                expr.Class("commented");
            }

            // For Debug View
            if (itemList is IEnumerable <ControllerActionDisplay> )
            {
                expr.Class("controlleraction");
            }
            if (itemList is IEnumerable <DebugSingleLineDisplay> )
            {
                expr = new GenericOpenTagExpression("ol");
                expr.Class("behavior");
            }

            return(expr);
        }
Exemplo n.º 3
0
        private static HtmlExpressionBase FohjinDefaultPartialBeforeEachItem(object item, int index, int total)
        {
            GenericOpenTagExpression expr = new GenericOpenTagExpression("li");

            if (item is PostDisplay || item is TagPostDisplay)
            {
                expr = new GenericOpenTagExpression("div");
                if (index == (total - 1))
                {
                    expr.Class("last");
                }
                return(expr);
            }
            if (item is CommentDisplay)
            {
                expr = new GenericOpenTagExpression("div");
                expr.Class("comment-field");
                expr.Class("curvy_corner_all");
                return(expr);
            }

            if (item is CommentDisplay)
            {
                if (index % 2 != 0)
                {
                    expr.Class("odd");
                }

                var comment = (CommentDisplay)item;
                if (comment.User != null)
                {
                    expr.Class(!comment.User.IsAuthenticated ? "anon" : comment.User.ID == comment.Post.User.ID ? "author" : "user");
                }
            }

            return(expr);
        }
Exemplo n.º 4
0
        private static HtmlExpressionBase FohjinDefaultPartialHeader(object itemList, int totalCount)
        {
            GenericOpenTagExpression expr = new GenericOpenTagExpression("ul");

            if (itemList is IEnumerable <PostDisplay> || itemList is IEnumerable <TagPostDisplay> )
            {
                expr = new GenericOpenTagExpression("div");
                expr.Class("blog_post");
                return(expr);
            }

            // For Debug View
            if (itemList is IEnumerable <ControllerActionDisplay> )
            {
                expr.Class("controlleraction");
            }
            if (itemList is IEnumerable <DebugSingleLineDisplay> )
            {
                expr = new GenericOpenTagExpression("ol");
                expr.Class("behavior");
            }

            return(expr);
        }
Exemplo n.º 5
0
        //protected void Session_Start(object sender, EventArgs e)
        //{

        //}

        //protected void Application_BeginRequest(object sender, EventArgs e)
        //{

        //}

        //protected void Application_AuthenticateRequest(object sender, EventArgs e)
        //{

        //}

        //protected void Application_Error(object sender, EventArgs e)
        //{

        //}

        //protected void Session_End(object sender, EventArgs e)
        //{

        //}

        //protected void Application_End(object sender, EventArgs e)
        //{

        //}

        private static HtmlExpressionBase FubuCartDefaultPartialHeader(object itemList, int totalCount)
        {
            var expr = new GenericOpenTagExpression("ul");

            return(expr);
        }