File tree Expand file tree Collapse file tree 6 files changed +40
-5
lines changed
Expand file tree Collapse file tree 6 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 1- @model Core .Data .ThemeWidget
1+ @model Core .Data .ThemeWidget
2+ @{
3+ var selectedType = " All" ;
4+ var maxRecords = " 10" ;
5+ string [] listTypes = new string [] { " All" , " By author" , " By category" };
6+ }
7+ <form method =" post" asp-antiforgery =" true" >
8+ <div class =" form-group" >
9+ <label class =" form-group-label" >List Type</label >
10+ <select id =" selTypes" name =" selTypes" class =" form-control" >
11+ @foreach ( var t in listTypes )
12+ {
13+ if (selectedType == t )
14+ {
15+ < option value = " @t" selected > @t < / option >
16+ }
17+ else
18+ {
19+ <option value =" @t" >@t </option >
20+ }
21+ }
22+ </select >
23+ </div >
24+ <div class =" form-group" >
25+ <label class =" form-group-label" >Max records</label >
26+ <input type =" text" id =" txtMaxRecords" name =" txtMaxRecords" class =" form-control" value =" @maxRecords" />
27+ </div >
28+ <div class =" form-group" >
29+ <button type =" submit" class =" btn btn-primary btn-main" >Save</button >
30+ </div >
31+ </form >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public PostList(IDataService db)
1313 _db = db ;
1414 }
1515
16- public IViewComponentResult Invoke ( )
16+ public IViewComponentResult Invoke ( string theme , string widget )
1717 {
1818 var model = _db . BlogPosts . All ( ) ;
1919
Original file line number Diff line number Diff line change 6868 foreach (var widget in Model .Widgets )
6969 {
7070 var path = $" ~/Views/Widgets/{widget .Widget }/Edit.cshtml" ;
71- <h6 >@widget.Title </h6 >
72- await Html .RenderPartialAsync (path , new ThemeWidget {
71+ <div class =" bf-title d-none d-lg-block" ><span >@widget.Title </span ></div >
72+ await Html .RenderPartialAsync (path , new ThemeWidget
73+ {
7374 Theme = Model .BlogItem .Theme ,
7475 Widget = widget
7576 });
Original file line number Diff line number Diff line change 22 {
33 "Widget" : " HtmlBlock" ,
44 "Title" : " Sidebar"
5+ },
6+ {
7+ "Widget" : " PostList" ,
8+ "Title" : " Post List"
59 }
610]
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <TargetFramework >netcoreapp2.1</TargetFramework >
5- <Version >2.1.0.8 </Version >
5+ <Version >2.1.0.9 </Version >
66 </PropertyGroup >
77
88 <ItemGroup >
You can’t perform that action at this time.
0 commit comments