Skip to content

Commit 5361a8e

Browse files
committed
Expose LastModifiedImportStrategy options
With the (proposed) 1.1 release of the OnTopic Data Transfer service, we are now able to granularly control the attribution used for the byline (`LastModifiedBy`) and dateline (`LastModified`). This update exposes those options to the user interface via a new "Attribution" tab in the import view.
1 parent 567da49 commit 5361a8e

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Editor/Import.cshtml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<li class="nav-item">
1616
<a id="Tab_Options" class="nav-link active" href="#Group_Options" data-toggle="tab" role="tab" aria-controls="#Group_Options" aria-expanded="true">Options</a>
1717
</li>
18+
<li class="nav-item">
19+
<a id="Tab_LastModified" class="nav-link" href="#Group_LastModified" data-toggle="tab" role="tab" aria-controls="#Group_LastModified" aria-expanded="true">Attribution</a>
20+
</li>
1821
<li class="nav-item">
1922
<a id="Tab_Advanced" class="nav-link" href="#Group_Advanced" data-toggle="tab" role="tab" aria-controls="#Group_Advanced" aria-expanded="true">Advanced</a>
2023
</li>
@@ -34,6 +37,7 @@
3437

3538
<div class="col-lg-9 col-sm-12">
3639
<div id="DisplayGroupTabsContent" class="tab-content tab-validate">
40+
3741
<div id="Group_Options" class="tab-pane fade show active" role="tabpanel" aria-labelledby="Tab_Options">
3842
<section id="Section_Options">
3943

@@ -72,6 +76,60 @@
7276

7377
</section>
7478
</div>
79+
80+
<div id="Group_LastModified" class="tab-pane fade" role="tabpanel" aria-labelledby="Tab_LastModified">
81+
<section id="Section_LastModified">
82+
83+
<h2>Attribution</h2>
84+
<p>
85+
Offers granular control over how the byline ("Last Modified By") and dateline ("Last Modified") are updated as part of the import process.
86+
</p>
87+
88+
<h3>Byline</h3>
89+
<section class="attribute">
90+
<label>
91+
<input type="radio" asp-for="ImportOptions.LastModifiedByStrategy" value="@LastModifiedImportStrategy.Inherit" /> Use Import Strategy
92+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Will treat the byline just like any other attribute, merging it according to the import strategy."></i>
93+
</label>
94+
<br />
95+
<label>
96+
<input type="radio" asp-for="ImportOptions.LastModifiedByStrategy" value="@LastModifiedImportStrategy.TargetValue" /> Previous Value
97+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Will always retain the existing byline, if present."></i>
98+
</label>
99+
<br />
100+
<label>
101+
<input type="radio" asp-for="ImportOptions.LastModifiedByStrategy" value="@LastModifiedImportStrategy.Current" /> Current User (@(Context.User.Identity.Name?? "System"))
102+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Updates the byline to the current user, just like it would when manually updating a topic via the editor."></i>
103+
</label>
104+
<br />
105+
<label>
106+
<input type="radio" asp-for="ImportOptions.LastModifiedByStrategy" value="@LastModifiedImportStrategy.System" /> System
107+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Updates the byline to 'System', which indicates that this was part of a system update and shouldn't be assigned to a specific contributor."></i>
108+
</label>
109+
</section>
110+
111+
<h3>Dateline</h3>
112+
<section class="attribute">
113+
<label>
114+
<input type="radio" asp-for="ImportOptions.LastModifiedStrategy" value="@LastModifiedImportStrategy.Inherit" /> Use Import Strategy
115+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Will treat the dateline just like any other attribute, merging it according to the import strategy."></i>
116+
</label>
117+
<br />
118+
<label>
119+
<input type="radio" asp-for="ImportOptions.LastModifiedStrategy" value="@LastModifiedImportStrategy.TargetValue" /> Previous Value
120+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Will always retain the existing last modified date, if present."></i>
121+
</label>
122+
<br />
123+
<label>
124+
<input type="radio" asp-for="ImportOptions.LastModifiedStrategy" value="@LastModifiedImportStrategy.Current" /> Current Time (@DateTime.Now.ToString("g"))
125+
<i class="fa fa-info-circle" data-toggle="tooltip" data-placement="right" title="Updates the dateline to the current time, just like it would when manually updating a topic via the editor."></i>
126+
</label>
127+
<br />
128+
</section>
129+
130+
</section>
131+
</div>
132+
75133
<div id="Group_Advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="Tab_Advanced">
76134
<section id="Section_Advanced">
77135

@@ -111,6 +169,7 @@
111169

112170
</section>
113171
</div>
172+
114173
</div>
115174
</div>
116175

0 commit comments

Comments
 (0)