Exemplo n.º 1
0
        private async Task <List <InputStyle> > GetInputStylesAsync(Channel channel)
        {
            var styles = new List <InputStyle>
            {
                new InputStyle
                {
                    AttributeName = nameof(Site.ImageUrl),
                    DisplayName   = "栏目图片",
                    InputType     = InputType.Image
                }
            };
            var tableStyles = await _tableStyleRepository.GetChannelStylesAsync(channel);

            styles.AddRange(tableStyles.Select(x => new InputStyle(x)));

            return(styles);
        }
Exemplo n.º 2
0
        private async Task <List <TableStyle> > GetStylesAsync(Channel channel)
        {
            var styles = new List <TableStyle>
            {
                new TableStyle()
                {
                    AttributeName = nameof(Channel.ImageUrl),
                    DisplayName   = "栏目图片",
                    InputType     = InputType.Image
                },
                new TableStyle()
                {
                    AttributeName = nameof(Channel.Content),
                    DisplayName   = "栏目正文",
                    InputType     = InputType.TextEditor
                }
            };
            var tableStyles = await _tableStyleRepository.GetChannelStylesAsync(channel);

            styles.AddRange(tableStyles);

            return(styles);
        }