コード例 #1
0
        public static string CreateVerifySelectedModalUrlHtml(string gridName, BulkTagModalDialogForm bulkTagModalDialogForm)
        {
            if (bulkTagModalDialogForm == null)
            {
                return(string.Empty);
            }

            var tagIconHtml =
                $"<span style=\"margin-right:5px\">{BootstrapHtmlHelpers.MakeGlyphIcon("glyphicon-ok")}</span>";

            var getProjectIDFunctionString =
                $"function() {{ return Sitka.{gridName}.getValuesFromCheckedGridRows({bulkTagModalDialogForm.CheckboxColumnIndex}, '{bulkTagModalDialogForm.ValueColumnName}', '{bulkTagModalDialogForm.ReturnListName}'); }}";

            return
                (ModalDialogFormHelper.ModalDialogFormLink($"{tagIconHtml}{bulkTagModalDialogForm.DialogLinkText}",
                                                           bulkTagModalDialogForm.DialogUrl,
                                                           bulkTagModalDialogForm.DialogTitle,
                                                           ModalDialogFormHelper.DefaultDialogWidth,
                                                           "Verify",
                                                           "Cancel",
                                                           new List <string> {
                "btn", "btn-neptune"
            },
                                                           null,
                                                           getProjectIDFunctionString).ToString());
        }
コード例 #2
0
 public static HtmlString SortOrderModalLink(string url, bool hasPermission)
 {
     return(ModalDialogFormHelper.ModalDialogFormLink("Edit Sort Order", url,
                                                      "Edit sort order", new List <string> {
         "btn", "btn-firma"
     }, hasPermission));
 }
コード例 #3
0
        public EditOrganizationsViewData(IProject iProject, FirmaSession currentFirmaSession, IEnumerable <ProjectFirmaModels.Models.Organization> organizations,
                                         IEnumerable <Person> allPeople, List <OrganizationRelationshipType> allOrganizationRelationshipTypes)
        {
            AllPeople        = allPeople.Select(x => new PersonSimple(x)).ToList();
            AllOrganizations = organizations.Where(x => x.OrganizationType.OrganizationTypeOrganizationRelationshipTypes.Any()).Select(x => new OrganizationSimple(x)).ToList();

            var userCanViewPrivateLocations = currentFirmaSession.UserCanViewPrivateLocations(iProject.GetProject());

            OrganizationContainingProjectSimpleLocation = allOrganizationRelationshipTypes.ToDictionary(
                x => x.OrganizationRelationshipTypeID, x =>
            {
                var organization = x.GetOrganizationContainingProjectSimpleLocation(iProject, userCanViewPrivateLocations);
                return(organization == null ? null : new OrganizationSimple(organization));
            });

            var primaryContactRelationshipType = MultiTenantHelpers.GetIsPrimaryContactOrganizationRelationship();

            PrimaryContactRelationshipTypeSimple = primaryContactRelationshipType != null
                ? new OrganizationRelationshipTypeSimple(primaryContactRelationshipType)
                : null;
            AllOrganizationRelationshipTypes = allOrganizationRelationshipTypes.Except(new[] { primaryContactRelationshipType }).Select(x => new OrganizationRelationshipTypeSimple(x)).ToList();

            RequestSupportUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(c => c.Support());

            RequestSupportLink = ModalDialogFormHelper.ModalDialogFormLink("Request Support", RequestSupportUrl,
                                                                           "Request Support", 800,
                                                                           "Submit Request", "Cancel", new List <string>(), null, null).ToString();
        }
コード例 #4
0
        private void MakeFirmaMenu(Person currentPerson)
        {
            TopLevelLtInfoMenuItems = new List <LtInfoMenuItem>
            {
                BuildAboutMenu(currentPerson),
                BuildProjectsMenu(currentPerson),
                BuildFinancialsMenuItem(currentPerson),
                BuildProgramInfoMenu(currentPerson)
            };
            TopLevelLtInfoMenuItems.Add(BuildManageMenu(currentPerson));

            TopLevelLtInfoMenuItems.ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-root-item"
            });
            TopLevelLtInfoMenuItems.SelectMany(x => x.ChildMenus).ToList().ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-dropdown-item"
            });

            HelpMenu = new LtInfoMenuItem("Help");
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem("Request Support",
                                                         ModalDialogFormHelper.ModalDialogFormLink("Request Support", RequestSupportUrl, "Request Support", 800,
                                                                                                   "Submit Request", "Cancel", new List <string>(), null, null).ToString(), "ToolHelp"));
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.Training()), currentPerson, "Training", "ToolHelp"));
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem("About ProjectFirma",
                                                         @"<a href='http://www.sitkatech.com/products/ProjectFirma/projectfirma-faqs/' target='_blank'>About ProjectFirma <span class='glyphicon glyphicon-new-window'></span></a>", "ExternalHelp"));
        }
コード例 #5
0
 public static HtmlString GisProjectBulkUploadButton()
 {
     return(ModalDialogFormHelper.ModalDialogFormLink(GetGisBulkUploadButtonText, GisProjectBulkUploadUrl,
                                                      GetGisBulkUploadButtonText, 700, GisProjectBulkUploadContinueButtonText, "Cancel",
                                                      new List <string> {
         "btn", "btn-firma", "addSomePadding"
     }, null, null));
 }
コード例 #6
0
 /// <summary>
 /// For making an edit icon on the grid with an editor in a jquery ui dialog
 /// If insufficient permissions, returns empty string
 /// </summary>
 public static HtmlString MakeModalDialogLink(string linkHtml, string dialogContentUrl, int dialogWidth, string dialogTitle, bool hasPermission, string saveButtonText, string cancelButtonText, List <string> extraCssClasses, string onJavascriptReadyFunction, string postData)
 {
     if (hasPermission)
     {
         return(ModalDialogFormHelper.ModalDialogFormLink(linkHtml, dialogContentUrl, dialogTitle, dialogWidth, saveButtonText, cancelButtonText, extraCssClasses, onJavascriptReadyFunction, postData));
     }
     return(new HtmlString(String.Empty));
 }
コード例 #7
0
 public static HtmlString AddProjectButton()
 {
     return(ModalDialogFormHelper.ModalDialogFormLink(GetAddNewProjectButtonText(), ProjectTypeSelectionUrl,
                                                      $"Add a {Models.FieldDefinition.Project.GetFieldDefinitionLabel()}", 700, ProjectTypeSelectionContinueButtonText, "Cancel",
                                                      new List <string> {
         "btn", "btn-firma"
     }, null, null));
 }
コード例 #8
0
ファイル: InviteViewData.cs プロジェクト: sitkatech/alevin
        public HtmlString GetRequestOrgAddedToKeystoneModalDialogLink(string linkText)
        {
            string requestOrganizationAddedToKeystoneUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.RequestOrganizationAddedToKeystone());

            HtmlString requestOrgAddedToKeystoneModalDialogLink = ModalDialogFormHelper.ModalDialogFormLink(linkText, requestOrganizationAddedToKeystoneUrl,
                                                                                                            "Request Support", 800, "Submit Request", "Cancel", new List <string>(), null, null);

            return(requestOrgAddedToKeystoneModalDialogLink);
        }
コード例 #9
0
 public static HtmlString AddObligationRequestButton()
 {
     return(ModalDialogFormHelper.ModalDialogFormLink(GetAddNewObligationRequestText(), NewObligationRequestUrl,
                                                      $"Add a {FieldDefinitionEnum.ObligationRequest.ToType().GetFieldDefinitionLabel()}", 900, "Save",
                                                      "Cancel",
                                                      new List <string> {
         "btn", "btn-firma"
     }, null, null));
 }
コード例 #10
0
        public ManageViewData(Person currentPerson,
                              Models.FirmaPage firmaPage,
                              string customNotificationUrl,
                              ProjectUpdateStatusGridSpec projectsRequiringUpdateGridSpec,
                              string projectsRequiringUpdateGridDataUrl,
                              PeopleReceivingReminderGridSpec peopleReceivingReminderGridSpec,
                              string peopleReceivingReminderGridDataUrl, int projectsWithNoContactCount,
                              ProjectUpdateConfiguration projectUpdateConfiguration) : base(currentPerson, firmaPage)
        {
            var reportingYear = FirmaDateUtilities.CalculateCurrentYearToUseForRequiredReporting();

            PageTitle     = $"Manage {Models.FieldDefinition.Project.GetFieldDefinitionLabel()} Updates";
            ReportingYear = reportingYear;

            ProjectsRequiringUpdateGridDataUrl = projectsRequiringUpdateGridDataUrl;
            ProjectsRequiringUpdateGridSpec    = projectsRequiringUpdateGridSpec;
            ProjectsRequiringUpdateGridName    = "projectsRequiringAnUpdateGrid";

            PeopleReceivingReminderGridDataUrl = peopleReceivingReminderGridDataUrl;
            ProjectsWithNoContactCount         = projectsWithNoContactCount;

            ProjectUpdateConfiguration = projectUpdateConfiguration ?? ProjectUpdateConfiguration.CreateNewBlank();

            PeopleReceivingReminderGridSpec = peopleReceivingReminderGridSpec;
            PeopleReceivingReminderGridName = "peopleReceivingAnReminderGrid";

            KickOffIntroPreviewUrl =
                SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.KickOffIntroPreview());

            ReminderIntroPreviewUrl =
                SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.ReminderIntroPreview());

            CloseOutIntroPreviewUrl =
                SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.CloseOutIntroPreview());

            var getPersonIDFunctionString =
                $"function() {{ return Sitka.{PeopleReceivingReminderGridName}.getValuesFromCheckedGridRows({0}, \'PersonID\', \'PersonIDList\'); }}";

            var modalDialogFormLink = ModalDialogFormHelper.ModalDialogFormLink(
                "<span class=\"glyphicon glyphicon-envelope\" style=\"margin-right:5px\"></span>Send Notification to Selected People",
                customNotificationUrl,
                "Send Notification to Selected People",
                700,
                "Send",
                "Cancel",
                new List <string>(),
                null,
                getPersonIDFunctionString);

            PeopleReceivingReminderGridSpec.ArbitraryHtml = new List <string> {
                modalDialogFormLink.ToString()
            };

            EditProjectUpdateConfigurationUrl =
                SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.EditProjectUpdateConfiguration());
        }
コード例 #11
0
 public static void AddTechnicalAssistanceParametersMenuItem(LtInfoMenuItem manageMenu, FirmaSession currentFirmaSession, string menuGroupName)
 {
     if (UsesTechnicalAssistanceParameters() && new FirmaAdminFeature().HasPermission(currentFirmaSession).HasPermission)
     {
         manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem("Technical Assistance Parameters",
                                                        ModalDialogFormHelper.ModalDialogFormLink("Technical Assistance Parameters",
                                                                                                  SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.TechnicalAssistanceParameters()),
                                                                                                  "Technical Assistance Parameters", 800,
                                                                                                  "Save", "Cancel", new List <string>(), null, null).ToString(), menuGroupName));
     }
 }
コード例 #12
0
        public static HtmlString EditCostAuthorityObligationRequestsButton(this ProjectFirmaModels.Models.ObligationRequest obligationRequest)
        {
            var disabledState     = obligationRequest.ObligationRequestStatus != ObligationRequestStatus.Draft ? ModalDialogFormHelper.DisabledState.Disabled : ModalDialogFormHelper.DisabledState.NotDisabled;
            var disabledHoverText = disabledState == ModalDialogFormHelper.DisabledState.Disabled
                ? "You cannot Add Obligation Item Budget Projections because this Obligation Request is not in a Draft state."
                : null;

            return(ModalDialogFormHelper.ModalDialogFormLink(MakeProjectNewObligationsText(), EditCostAuthorityObligationRequestsUrl(obligationRequest),
                                                             $"Create new Obligation Item Budget Projections", 1100, "Save",
                                                             "Cancel",
                                                             new List <string> {
                "btn", "btn-firma"
            }, null, null, disabledState, disabledHoverText));
        }
コード例 #13
0
        public static string CreateGenerateReportUrlHtml(string gridName, SelectProjectsModalDialogForm modalDialogForm)
        {
            var tagIconHtml =
                $"<span style=\"margin-right:5px\">{BootstrapHtmlHelpers.MakeGlyphIcon("glyphicon-file")}</span>";
            var getProjectIDFunctionString =
                $"function() {{ return Sitka.{gridName}.getValuesFromCheckedGridRows({modalDialogForm.CheckboxColumnIndex}, '{modalDialogForm.ValueColumnName}', '{modalDialogForm.ReturnListName}'); }}";

            return(ModalDialogFormHelper.ModalDialogFormLink($"{tagIconHtml} Generate Reports",
                                                             modalDialogForm.DialogUrl,
                                                             modalDialogForm.DialogTitle,
                                                             ModalDialogFormHelper.DefaultDialogWidth,
                                                             "Generate",
                                                             "Close",
                                                             new List <string>(),
                                                             null,
                                                             getProjectIDFunctionString,
                                                             true).ToString());
        }
コード例 #14
0
        /// <summary>
        /// For making an edit icon on the grid with an editor in a jquery ui dialog
        /// </summary>
        public static HtmlString MakeLtInfoEditIconAsModalDialogLinkBootstrap(ModalDialogForm modalDialogForm)
        {
            string        linkText        = $"{EditIconBootstrap}<span style=\"display:none\">Edit</span>";
            List <string> extraCssClasses = new List <string>();

            return(ModalDialogFormHelper.ModalDialogFormLink(null,
                                                             linkText,
                                                             modalDialogForm.ContentUrl,
                                                             modalDialogForm.DialogTitle,
                                                             modalDialogForm.DialogWidth,
                                                             ModalDialogFormHelper.SaveButtonID,
                                                             "Save",
                                                             "Cancel",
                                                             extraCssClasses,
                                                             modalDialogForm.OnJavascriptReadyFunction,
                                                             null,
                                                             null));
        }
コード例 #15
0
        private void AddEditAndOrViewColumn()
        {
            Add(String.Empty,
                x =>
            {
                var latestUpdateState = x.GetLatestUpdateState();

                if (!x.IsUpdateMandatory && (latestUpdateState == null || latestUpdateState == ProjectUpdateState.Approved))
                {
                    return
                    (ModalDialogFormHelper.ModalDialogFormLink("Begin",
                                                               SitkaRoute <ProjectController> .BuildUrlFromExpression(y => y.ConfirmNonMandatoryUpdate(x.PrimaryKey)),
                                                               $"Update this {Models.FieldDefinition.Project.GetFieldDefinitionLabel()}?",
                                                               400,
                                                               "Continue",
                                                               "Cancel",
                                                               new List <string> {
                        "btn", "btn-xs", "btn-firma"
                    },
                                                               null,
                                                               null));
                }

                var linkText = "Begin";
                if (latestUpdateState == ProjectUpdateState.Created)
                {
                    linkText = "Edit";
                }
                else if (latestUpdateState == ProjectUpdateState.Returned)
                {
                    linkText = "Re-Edit";
                }
                else if (latestUpdateState == ProjectUpdateState.Submitted)
                {
                    linkText = _canStewardProjects ? "Review" : "View";
                }

                return(UrlTemplate.MakeHrefString(x.GetProjectUpdateUrl(), linkText, new Dictionary <string, string> {
                    { "class", "btn btn-xs btn-firma" }
                }));
            },
                60);
        }
コード例 #16
0
        private void MakeFirmaMenu(FirmaSession currentFirmaSession)
        {
            TopLevelLtInfoMenuItems = new List <LtInfoMenuItem>
            {
                BuildAboutMenu(currentFirmaSession),
                BuildProjectsMenu(currentFirmaSession),
                // WARNING: This has been deleted multiple times. We are manually re-adding it. If a conflict occurs here, lets talk - SMG & SLG
                BuildAgreementsMenu(currentFirmaSession),
                //BuildObligationsMenu(currentFirmaSession),
                BuildProgramInfoMenu(currentFirmaSession)
            };

            if (MultiTenantHelpers.DisplayAccomplishmentDashboard() || MultiTenantHelpers.UsesCustomResultsPages(currentFirmaSession))
            {
                TopLevelLtInfoMenuItems.Add(BuildResultsMenu(currentFirmaSession));
            }

            if (MultiTenantHelpers.DisplayReportsLink())
            {
                TopLevelLtInfoMenuItems.Add(BuildReportsMenu(currentFirmaSession));
            }

            TopLevelLtInfoMenuItems.Add(BuildManageMenu(currentFirmaSession));
            TopLevelLtInfoMenuItems.Add(BuildConfigureMenu(currentFirmaSession));

            TopLevelLtInfoMenuItems.ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-root-item"
            });
            TopLevelLtInfoMenuItems.SelectMany(x => x.ChildMenus).ToList().ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-dropdown-item"
            });

            HelpMenu = new LtInfoMenuItem("Help");
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem("Request Support",
                                                         ModalDialogFormHelper.ModalDialogFormLink("Request Support", RequestSupportUrl, "Request Support", 800,
                                                                                                   "Submit Request", "Cancel", new List <string>(), null, null).ToString(), "ToolHelp"));
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.Training()), currentFirmaSession, "Training", "ToolHelp"));
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.InternalSetupNotes()), currentFirmaSession, "Internal Setup Notes", "ToolHelp"));
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.ReleaseNotes()), currentFirmaSession, "Release Notes", "ToolHelp"));
            AddCustomPagesToMenu(currentFirmaSession, FirmaMenuItem.Help, HelpMenu, "CustomHelp");
            HelpMenu.AddMenuItem(LtInfoMenuItem.MakeItem("About ProjectFirma",
                                                         @"<a href='http://www.sitkatech.com/products/ProjectFirma/projectfirma-faqs/' target='_blank'>About ProjectFirma <span class='glyphicon glyphicon-new-window'></span></a>", "ExternalHelp"));
        }
コード例 #17
0
ファイル: ProjectTimeline.cs プロジェクト: sitkatech/alevin
 public ProjectTimelineProjectStatusChangeEvent(ProjectProjectStatus projectProjectStatus, bool canEditProjectProjectStatus, bool canEditFinalStatusReport)
 {
     Date        = projectProjectStatus.ProjectProjectStatusUpdateDate;
     DateDisplay = Date.ToString("MMM dd, yyyy");
     FiscalYear  = FirmaDateUtilities.CalculateFiscalYearForTenant(Date);
     Quarter     = (Quarter)FirmaDateUtilities.CalculateQuarterForTenant(Date);
     ProjectTimelineEventType       = ProjectTimelineEventType.ProjectStatusChange;
     TimelineEventTypeDisplayName   = projectProjectStatus.IsFinalStatusUpdate ? "Final Status Update" : "Status Updated";
     TimelineEventPersonDisplayName = projectProjectStatus.ProjectProjectStatusCreatePerson.GetPersonDisplayNameWithContactTypesListForProject(projectProjectStatus.Project);
     ProjectTimelineSide            = ProjectTimelineSide.Right;
     EditButton   = ProjectTimeline.MakeProjectStatusEditLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
     DeleteButton = ProjectTimeline.MakeProjectStatusDeleteLinkButton(projectProjectStatus, canEditProjectProjectStatus, canEditFinalStatusReport);
     Color        = projectProjectStatus.ProjectStatus.ProjectStatusColor;
     ShowDetailsLinkHtmlString = ProjectTimeline.MakeProjectStatusDetailsLinkButton(projectProjectStatus);
     ProjectProjectStatus      = projectProjectStatus;
     ActionItems = projectProjectStatus.ActionItems.ToList();
     AddActionItemLinkHtmlString = ModalDialogFormHelper.ModalDialogFormLink(string.Format("<span class='glyphicon glyphicon-plus' style='margin-right: 3px'></span>Add {0}", FieldDefinitionEnum.ActionItem.ToType().GetFieldDefinitionLabel()), SitkaRoute <ActionItemController> .BuildUrlFromExpression(c => c.NewForProjectStatus(projectProjectStatus.Project, projectProjectStatus)), string.Format("Add New {0}", FieldDefinitionEnum.ActionItem.ToType().GetFieldDefinitionLabel()), 700, "Add", "Cancel", new List <string> {
     }, null, null);
 }
コード例 #18
0
        public static HtmlString GetEditUrlForGrid(this OnlandVisualTrashAssessment onlandVisualTrashAssessment, Person currentPerson)
        {
            var userCanEdit = new OnlandVisualTrashAssessmentEditStatusFeature()
                              .HasPermission(currentPerson, onlandVisualTrashAssessment)
                              .HasPermission;

            if (!userCanEdit)
            {
                return(new HtmlString(Empty));
            }

            return(onlandVisualTrashAssessment.OnlandVisualTrashAssessmentStatus ==
                   OnlandVisualTrashAssessmentStatus.Complete
                ? ModalDialogFormHelper.ModalDialogFormLink("Return to Edit", GetEditStatusToAllowEditUrl(onlandVisualTrashAssessment),
                                                            $"Return to Edit On-land Visual Trash Assessment for {onlandVisualTrashAssessment.OnlandVisualTrashAssessmentArea.OnlandVisualTrashAssessmentAreaName}",
                                                            500, "Continue", "Cancel", new List <string> {
                "gridButton"
            },
                                                            null, null) : DhtmlxGridHtmlHelpers.MakeEditIconAsHyperlinkBootstrap(GetEditUrl(onlandVisualTrashAssessment)));
        }
コード例 #19
0
 public ProjectUpdateBatchGridSpec()
 {
     Add("Date", x => x.LastUpdateDate, 120);
     Add($"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} Update Status", x => x.ProjectUpdateState.ProjectUpdateStateDisplayName, 170, DhtmlxGridColumnFilterType.SelectFilterStrict);
     Add("Updated By", x => x.LastUpdatePerson.GetFullNameFirstLastAndOrgShortName(), 350, DhtmlxGridColumnFilterType.SelectFilterStrict);
     Add($"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} Update Details",
         pub =>
     {
         if (pub.ProjectUpdateState == ProjectUpdateState.Approved && pub.LastUpdateDate.IsDateOnOrAfter(_detailTrackingStartDate))
         {
             var url = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(c => c.ProjectUpdateBatchDiff(pub));
             return(ModalDialogFormHelper.ModalDialogFormLink("diff-link-id",
                                                              "Show Details",
                                                              url,
                                                              $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} Update Change Log",
                                                              1000,
                                                              "hidden-save-button",
                                                              string.Empty,
                                                              "Close",
                                                              new List <string> {
                 "btn", "btn-xs", "btn-firma"
             },
                                                              null,
                                                              null,
                                                              null));
         }
         else if (pub.ProjectUpdateState == ProjectUpdateState.Approved)
         {
             return(new HtmlString("Only available for Updates submitted after " + _detailTrackingStartDate.ToShortDateString()));
         }
         else
         {
             return(new HtmlString("Not yet submitted"));
         }
     },
         270);
 }
コード例 #20
0
ファイル: SortOrderHelper.cs プロジェクト: sitkatech/neptune
 public static HtmlString SortOrderModalLink(string url, bool hasPermission)
 {
     return(ModalDialogFormHelper.ModalDialogFormLink("<span title='Edit Sort Order' class='glyphicon glyphicon-sort'></span>", url,
                                                      "Edit Sort Order", null, hasPermission));
 }