Esempio n. 1
0
        public void Describe(Orchard.Forms.Services.DescribeContext context)
        {
            Func<IShapeFactory, object> form =
                shape =>
                {
                    var f = _shapeFactory.Form(
                        Id: "ContainedByFilterForm",
                        _Parts: _shapeFactory.Textbox(
                            Id: "ContainerId", Name: "ContainerId",
                            Title: T("Container Id"),
                            Description: T("The numerical id of the content item containing the items to fetch."),
                            Classes: new[] { "tokenized" })
                        );


                    return f;
                };

            context.Form("ContainedByFilter", form);

        }
        public void Describe(Orchard.Forms.Services.DescribeContext context)
        {
            Func<IShapeFactory, object> form =
                shape =>
                {
                    var f = _shapeFactory.Form(
                        Id: "IdsInFilterForm",
                        _Parts: _shapeFactory.Textbox(
                            Id: "ContentIds", Name: "ContentIds",
                            Title: T("Contents Ids"),
                            Description: T("A comma-separated list of the ids of contents to match. Items should have CommonPart attached."),
                            Classes: new[] { "tokenized" })
                        );

                    return f;
                };

            context.Form("IdsInFilter", form);
        }
        public void Describe(Orchard.Forms.Services.DescribeContext context)
        {
            Func<IShapeFactory, object> form =
                shape =>
                {
                    var f = _shapeFactory.Form(
                        Id: "AssociativySearchFilterForm",
                        _GraphName: _shapeFactory.SelectList(
                            Id: "GraphName", Name: "GraphName",
                            Title: T("Graph"),
                            Description: T("Select a graph to fetch the connections from."),
                            Size: 10,
                            Multiple: false
                            ),
                        _Labels: _shapeFactory.Textbox(
                            Id: "associativy-search-filter-labels", Name: "Labels",
                            Title: T("Search terms"),
                            Description: T("Enter labels of Associativy terms here."),
                            Classes: new[] { "text textMedium tokenized" }),
                        _IncludeSearched: _shapeFactory.Checkbox(
                            Id: "associativy-search-filter-include-searched", Name: "IncludeSearched",
                            Title: T("Include searched nodes"),
                            Description: T("If checked, the nodes searched will be included in the result themselves too."),
                            Value: "on"),
                        _SearchForm: _shapeFactory.ProjectorFilterSearchFormDynamics()
                        );

                    foreach (var graph in _graphManager.FindGraphs(GraphContext.Empty))
                    {
                        f._GraphName.Add(new SelectListItem { Value = graph.Name, Text = graph.DisplayName.Text });
                    }

                    return f;
                };

            context.Form("AssociativySearchFilter", form);
        }
Esempio n. 4
0
        public void Describe(Orchard.Forms.Services.DescribeContext context)
        {
            Func<IShapeFactory, object> form =
                shape =>
                {
                    var f = _shapeFactory.Form(
                        Id: "SearchFilterForm",
                        _Index: _shapeFactory.SelectList(
                            Id: "Index", Name: "Index",
                            Title: T("Index"),
                            Description: T("The selected index will be queried."),
                            Size: 5,
                            Multiple: false),
                        _SearchQuery: _shapeFactory.Textbox(
                            Id: "SearchQuery", Name: "SearchQuery",
                            Title: T("Search query"),
                            Description: T("The search query to match against."),
                            Classes: new[] { "tokenized" }),
                        _HitCountLimit: _shapeFactory.Textbox(
                            Id: "HitCountLimit", Name: "HitCountLimit",
                            Title: T("Hit count limit"),
                            Description: T("For performance reasons you can limit the maximal number of search hits used in the query. Having thousands of search hits will result in poor performance and increased load on the database server."))
                        );

                    foreach (var index in _indexProvider.List())
                    {
                        f._Index.Add(new SelectListItem { Value = index, Text = index });
                    }

                    return f;
                };

            context.Form("SearchFilter", form);
        }
        public void Describe(Orchard.Forms.Services.DescribeContext context)
        {
            Func<IShapeFactory, object> form =
                shape =>
                {
                    var f = _shapeFactory.Form(
                        Id: "AssociativyNeighboursFilterForm",
                        _ItemId: _shapeFactory.Textbox(
                            Id: "ItemId", Name: "ItemId",
                            Title: T("Item Id"),
                            Description: T("The numerical id of the content item whose connected items should be fetched."),
                            Classes: new[] { "tokenized textMedium" }),
                        _GraphName: _shapeFactory.SelectList(
                            Id: "GraphName", Name: "GraphName",
                            Title: T("Graph"),
                            Description: T("Select a graph to fetch the neighbours from."),
                            Size: 10,
                            Multiple: false
                            )
                        );

                    foreach (var graph in _graphManager.FindGraphs(GraphContext.Empty))
                    {
                        f._GraphName.Add(new SelectListItem { Value = graph.Name, Text = graph.DisplayName.Text });
                    }

                    return f;
                };

            context.Form("AssociativyNeighboursFilter", form);
        }