Skip to content

Commit

Permalink
Allow signature label customization #116
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-yagodin committed Apr 16, 2021
1 parent 142e348 commit a75fb8b
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 1 deletion.
6 changes: 6 additions & 0 deletions R7.Documents.Dnn/App_LocalResources/ViewDocuments.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,10 @@
<data name="DeleteDocumentsWithFiles.Action" xml:space="preserve">
<value>Delete Selected with Files</value>
</data>
<data name="SignatureLink_Label.Text" xml:space="preserve">
<value>.sig</value>
</data>
<data name="SignatureLink_Tooltip.Text" xml:space="preserve">
<value>Digital Signature</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,10 @@
<data name="DeleteDocumentsWithFiles.Action" xml:space="preserve">
<value>Удалить отмеченные с файлами</value>
</data>
<data name="SignatureLink_Tooltip.Text" xml:space="preserve">
<value>Электронная подпись</value>
</data>
<data name="SignatureLink_Label.Text" xml:space="preserve">
<value>.sig</value>
</data>
</root>
3 changes: 3 additions & 0 deletions R7.Documents.Dnn/R7.Documents.Dnn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="etc" />
<Folder Include="SqlDataProvider\" />
<Folder Include="Properties\" />
<Folder Include="Models\" />
Expand Down Expand Up @@ -140,6 +141,8 @@
<None Include="App_LocalResources\ChangeFolder.ascx.ru-RU.resx" />
<None Include="App_LocalResources\ImportDocuments.ascx.resx" />
<None Include="App_LocalResources\ImportDocuments.ascx.ru-RU.resx" />
<None Include="etc\volgau.com\App_LocalResources\ViewDocuments.ascx.Host.resx" />
<None Include="etc\volgau.com\App_LocalResources\ViewDocuments.ascx.ru-RU.Host.resx" />
<None Include="R7.Documents.dnn.template">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
6 changes: 5 additions & 1 deletion R7.Documents.Dnn/ViewModels/DocumentViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ public HtmlString SignatureLink {
if (sigFile == null) {
return new HtmlString (string.Empty);
}
return new HtmlString ($"<a href=\"{Globals.LinkClick ("fileid=" + sigFile.FileId, Dnn.Module.TabId, Dnn.Module.ModuleId)}\">.sig</a>");

return new HtmlString (
$"<a href=\"{Globals.LinkClick ("fileid=" + sigFile.FileId, Dnn.Module.TabId, Dnn.Module.ModuleId)}\""
+ $" title=\"{Dnn.LocalizeString ("SignatureLink_Tooltip.Text")}\">"
+ $"{Dnn.LocalizeString ("SignatureLink_Label.Text")}</a>");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="SignatureLink_Label.Text" xml:space="preserve">
<value>&lt;i class="fas fa-signature"&gt;&lt;/i&gt;</value>
</data>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="SignatureLink_Label.Text" xml:space="preserve">
<value>&lt;i class="fas fa-signature"&gt;&lt;/i&gt;</value>
</data>
</root>

0 comments on commit a75fb8b

Please sign in to comment.