File tree Expand file tree Collapse file tree 6 files changed +31
-22
lines changed
Expand file tree Collapse file tree 6 files changed +31
-22
lines changed Original file line number Diff line number Diff line change 1313 <EmbeddedResource Include =" Views\**\*" />
1414 </ItemGroup >
1515
16- <ItemGroup >
17- <None Remove =" Views\Widgets\HtmlBlock\Index.cshtml" />
18- </ItemGroup >
19-
2016 <ItemGroup >
2117 <ProjectReference Include =" ..\..\src\Core\Core.csproj" />
2218 </ItemGroup >
Original file line number Diff line number Diff line change 1+ @model Core .Data .Widget
2+ @{
3+ var prop = Model .Props .Where (p => p .Id == " Title" ).FirstOrDefault ();
4+ string title = prop == null ? " HTML Widget" : prop .Value ;
5+ }
6+ <h4 >@title </h4 >
7+ <form id =" usrform" >
8+ <div class =" form-group" >
9+ <textarea rows =" 4" name =" txtHtml" class =" form-control" ></textarea >
10+ </div >
11+ <div class =" form-group" >
12+ <button type =" submit" class =" btn btn-primary btn-main" >Save</button >
13+ </div >
14+ </form >
Original file line number Diff line number Diff line change 1+ @model Core .Data .Widget
2+ <h4 >Post List</h4 >
Original file line number Diff line number Diff line change 6363 </div >
6464 <div class =" modal-body" >
6565 <div class =" settings-body" >
66- @* <nav>
67- <div class="nav nav-tabs" id="nav-tab" role="tablist">
68- <a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Home</a>
69- <a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</a>
70- <a class="nav-item nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</a>
71- </div>
72- </nav>
73- <div class="tab-content" id="nav-tabContent">
74- <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">aaaaa</div>
75- <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">bbbbb</div>
76- <div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">cccccc</div>
77- </div>*@
66+ @if (Model .Widgets != null )
67+ {
68+ foreach (var widget in Model .Widgets .Widgets )
69+ {
70+ var path = $" ~/Views/Widgets/{widget .Name }/Edit.cshtml" ;
71+ await Html .RenderPartialAsync (path , widget );
72+ }
73+ }
7874 </div >
7975 </div >
8076 <div class =" modal-footer d-flex" >
8177 <button class =" btn btn-link btn-sm btn-rounded ml-auto" type =" button" data-dismiss =" modal" >cancel</button >
82- <button id =" btnSelect" class =" btn btn-primary btn-sm btn-rounded" type =" button" onclick =" return saveSettings()" >Save</button >
8378 </div >
8479 </div >
8580 </div >
9893 $ (' #themeSettings' ).modal ();
9994 return false ;
10095 }
101- var saveSettings = function () {
102- toastr .success (' Updated' );
103- }
10496 </script >
10597}
Original file line number Diff line number Diff line change 1616 },
1717 {
1818 "Name" : " HtmlBlock" ,
19- "Props" : []
19+ "Props" : [
20+ {
21+ "Id" : " Title" ,
22+ "Value" : " Social Buttons"
23+ }
24+ ]
2025 }
2126 ]
2227}
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <TargetFramework >netcoreapp2.1</TargetFramework >
5- <Version >2.1.0.6 </Version >
5+ <Version >2.1.0.7 </Version >
66 </PropertyGroup >
77
88 <ItemGroup >
You can’t perform that action at this time.
0 commit comments