restore Syntax to details expander

closes #532
This commit is contained in:
Collin M. Barrett 2018-09-29 12:00:02 -05:00
parent a495fbd6bc
commit 2ba103414f
4 changed files with 13 additions and 6 deletions

View file

@ -7,6 +7,7 @@ namespace FilterLists.Services.Syntax.Models
public class SyntaxDto
{
public int Id { get; set; }
public string DefinitionUrl { get; set; }
public List<int> FilterListIds { get; set; }
public string Name { get; set; }
public List<int> SoftwareIds { get; set; }

View file

@ -50,7 +50,7 @@ export const InfoCard = (props: IProps) =>
? null
: <UpdatedDate {...props}/>}
<PublishedDate date={props.publishedDate}/>
<Syntax {...props.syntax}/>
<Syntax {...props}/>
{ /*<License {...props.license}/>*/ }
</ul>
</div>;

View file

@ -1,12 +1,17 @@
import * as React from "react";
import { ISyntax } from "../../../interfaces";
export const Syntax = (props: any) =>
props.name
? (props.definitionUrl
interface IProps {
syntax: ISyntax;
};
export const Syntax = (props: IProps) =>
props.syntax
? (props.syntax.definitionUrl
? <li className="list-group-item">
<p>Syntax: <a href={props.definitionUrl}>{props.name}</a></p>
<p>Syntax: <a href={props.syntax.definitionUrl}>{props.syntax.name}</a></p>
</li>
: <li className="list-group-item">
<p>Syntax: {props.name}</p>
<p>Syntax: {props.syntax.name}</p>
</li>)
: null;

View file

@ -1,5 +1,6 @@
export interface ISyntax {
id: number;
definitionUrl: string;
filterListIds: number[];
name: string;
softwareIds: number[];