Exemplo n.º 1
0
    //----------------------------------------------------------
    #endregion

    #region ----------------BuildStaticPageWithCommentsLinks---------------
    //----------------------------------------------------------
    //BuildStaticPageWithCommentsLinks
    //----------------------------------------------------------
    public string BuildStaticPageWithCommentsLinks()
    {
        string             links     = "";
        string             folder    = "SitePages";
        SiteModulesManager sitePages = SiteModulesManager.Instance;
        int inactiveCommentsCount    = 0;
        int activeCommentsCount      = 0;

        foreach (SitePageOptions page in sitePages.SitePagesList)
        {
            if (page.IsAvailabe && page.AddInAdminMenuAutmaticly && page.HasComments)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/") + "><a href=\"#\"><i class=\"icon-stack2\"></i><span>" + page.Title + "</span></a>";
                links += "<ul>";
                //---------------------------------------------------
                inactiveCommentsCount = ItemsCommentsFactory.GetCount(page.PageID, Languages.Unknowen, page.ModuleTypeID, true, false, false, SitesHandler.GetOwnerIDAsGuid());
                activeCommentsCount   = ItemsCommentsFactory.GetCount(page.PageID, Languages.Unknowen, page.ModuleTypeID, true, true, false, SitesHandler.GetOwnerIDAsGuid());
                //---------------------------------------------------
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/StaticContents.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/StaticContents.aspx?id=" + page.PageID + "\">" + page.Title + "</a></li>";
                //---------------------------------------------------
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Comments/ItemInActiveComments.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Comments/ItemInActiveComments.aspx?id=" + page.PageID + "\">" + Resources.Modules.Module_CommentsInactive + " -" + inactiveCommentsCount + "</a></li>";
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Comments/ItemActiveComments.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Comments/ItemActiveComments.aspx?id=" + page.PageID + "\">" + Resources.Modules.Module_CommentsActive + " -" + activeCommentsCount + "</a></li>";
                links += "    ";
                //---------------------------------------------------
                links += "</ul>";
            }
        }
        return(links);
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Visible = false;
        return;

        if (!IsPostBack)
        {
            trCategories.Visible = false;
            trMessages.Visible   = false;
            trExport.Visible     = false;
            trComments.Visible   = false;
            if (CurrentMessagesModule.CategoryLevel != 0 && CurrentMessagesModule.DisplayCategoriesInAdminMenue)
            {
                trCategories.Visible = true;
            }
            trMessages.Visible = true;
            if (CurrentMessagesModule.HasExportData)
            {
                trExport.Visible = true;
            }
            if (CurrentMessagesModule.HasComments)
            {
                trComments.Visible       = true;
                inactiveCommentsCount    = ItemsCommentsFactory.GetCount(-1, Languages.Unknowen, CurrentMessagesModule.ModuleTypeID, true, false, false, OwnerID);
                lblInactiveComments.Text = Resources.Modules.Module_CommentsInactive + " -" + inactiveCommentsCount;
            }
        }
    }
Exemplo n.º 3
0
    //----------------------------------------------------------
    #region ----------------BuildItemsModuleLinks---------------
    //----------------------------------------------------------
    //BuildItemsModuleLinks
    //----------------------------------------------------------
    public string BuildItemsModuleLinks(int moduleType)
    {
        ItemsModulesOptions itemsModule = ItemsModulesOptions.GetType(moduleType);
        string moduleTitleText          = itemsModule.GetModuleTitle();
        string categoriesAddText        = Resources.Modules.Module_CategoriesAdd;
        string categoriesDefaultText    = Resources.Modules.Module_CategoriesDefault;
        string itemsAddText             = Resources.Modules.Module_ItemsAdd;
        string itemsDefaultText         = Resources.Modules.Module_ItemsDefault;
        string itemsPhotosAddText       = Resources.Modules.Module_ItemsPhotosAdd;
        //string Module_NewMessage = DynamicResource.GetText(itemsModule, "Module_NewMessage");
        //string Module_AllMessage = DynamicResource.GetText(itemsModule, "Module_AllMessage");
        string commentsInactiveText = Resources.Modules.Module_CommentsInactive;
        string newMessageText       = Resources.Modules.Module_NewMessage;
        string allMessageText       = Resources.Modules.Module_AllMessage;

        if (itemsModule.HasSpecialAdminText)
        {
            //moduleTitleText = itemsModule.GetModuleTitle();
            categoriesAddText     = DynamicResource.GetText(itemsModule, "Module_CategoriesAdd");
            categoriesDefaultText = DynamicResource.GetText(itemsModule, "Module_CategoriesDefault");
            itemsAddText          = DynamicResource.GetText(itemsModule, "Module_ItemsAdd");
            itemsDefaultText      = DynamicResource.GetText(itemsModule, "Module_ItemsDefault");
            itemsPhotosAddText    = DynamicResource.GetText(itemsModule, "Module_ItemsPhotosAdd");
            commentsInactiveText  = DynamicResource.GetText(itemsModule, "Module_CommentsInactive");
            newMessageText        = DynamicResource.GetText(itemsModule, "Module_NewMessage");
            allMessageText        = DynamicResource.GetText(itemsModule, "Module_AllMessage");
        }
        string links  = "";
        string folder = itemsModule.Identifire.ToString();

        if (ZecurityManager.CheckFolderPermission("/AdminCP/Items/" + folder + "/"))
        {
            links += "<li " + AdditionalLinkClassIfActive("/AdminCP/Items/" + folder + "/") + "><a href=\"#\"><i class=\"icon-stack2\"></i><span>" + itemsModule.GetModuleTitle() + "</span></a>";
            links += "<ul>";
            if (itemsModule.CategoryLevel != 0 && itemsModule.DisplayCategoriesInAdminMenue)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Cats/Add.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Cats/Add.aspx\">" + categoriesAddText + "</a></li>";
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Cats/default.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Cats/default.aspx\">" + categoriesDefaultText + "</a></li>";
            }

            links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Add.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Add.aspx\">" + itemsAddText + "</a></li>";
            links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/default.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/default.aspx\">" + itemsDefaultText + "</a></li>";
            if (itemsModule.HasMultiPhotos)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/AddPhoto.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/AddPhoto.aspx\">" + itemsPhotosAddText + "</a></li>";
            }
            if (itemsModule.MessagesModuleID > 0)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Messages/New.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Messages/New.aspx\">" + newMessageText + "</a></li>";
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Messages/default.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Messages/default.aspx\">" + DynamicResource.GetText(itemsModule, "Module_AllMessage") + "</a></li>";
            }
            if (itemsModule.HasComments)
            {
                int inactiveCommentsCount = ItemsCommentsFactory.GetCount(-1, Languages.Unknowen, itemsModule.ModuleTypeID, true, false, false, SitesHandler.GetOwnerIDAsGuid());
                links += "<li " + AdditionalLinkClassIfActive("/Items/" + folder + "/Comments/InActive.aspx") + "><a href=\"/AdminCP/Items/" + folder + "/Comments/InActive.aspx\">" + commentsInactiveText + " -" + inactiveCommentsCount + "</a></li>";
                links += "    ";
            }
            links += "</ul>";
        }
        return(links);
    }