Skip to content

Commit d3523f0

Browse files
committed
#778 add metadata download for users with edit rights
1 parent 46779a2 commit d3523f0

File tree

1 file changed

+44
-41
lines changed

1 file changed

+44
-41
lines changed

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/MetadataEditor.cshtml

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,14 @@
134134
<div>
135135
<table>
136136
<tr>
137-
@*@if (locked)
137+
@if (locked)
138138
{
139+
if (Model.EditRight)
140+
{
141+
<td style="width:500px;">
139142

140-
<td style="width:500px;">
141-
142-
@if (Model.LatestVersion)
143-
{
143+
@if (Model.LatestVersion)
144+
{
144145

145146
<span class="dropdown">
146147
<button class="bx-button small function" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@@ -155,34 +156,36 @@
155156
<li><a id="downloadXmlButton" onclick="downloadXml()">... as XML</a></li>
156157
</ul>
157158
</span>
158-
}
159-
else
160-
{
159+
}
160+
else
161+
{
161162
<button class="bx-button function bx-disabled" disabled="disabled" title="You can only download the metadata of the latest version directly.">Download Metadata </button>
162-
}
163+
}
163164

164-
@if (Model.EditRight)
165+
@*@if (Model.EditRight)
165166
{
166167
<button class="bx-button small function" title="Edit Metadata" onclick="edit()">
167168
<span class="fa fa-pencil"></span>
168169
<span style="padding:5px;">
169170
Edit Metadata
170171
</span>
171172
</button>
172-
}
173+
}*@
173174

174-
@Html.CheckBox("showAll", @showOptional, new { OnChange = "switchVisibilityOfOptionalElements()", Name = "showAll", Id = "showAll" })
175+
@Html.CheckBox("showAll", @showOptional, new { OnChange = "switchVisibilityOfOptionalElements()", Name = "showAll", Id = "showAll" })
175176

176-
<b>show all fields</b>
177+
<b>show all fields</b>
178+
177179

178180

179-
</td>
180-
}*@
181+
</td>
182+
}
183+
}
181184

182-
@if (!Model.Created && !locked && Model.Import)
183-
{
184-
<td style="width: 100px">
185-
@(Html.Telerik().Upload()
185+
@if (!Model.Created && !locked && Model.Import)
186+
{
187+
<td style="width: 100px">
188+
@(Html.Telerik().Upload()
186189
.Name("SelectFileUploader")
187190
.Multiple(false)
188191
.ShowFileList(false)
@@ -196,33 +199,33 @@
196199
.AutoUpload(true))
197200

198201
)
199-
</td>
200-
}
201-
<td>
202-
@if (ViewData["IsValid"] == "no")
203-
{
204-
<div id="view-warning-container">
205-
<div id="view-warning" class="alert alert-danger" role="alert" style="width: 100%;">
206-
<span id="view-warning-icon" class=" fa fa-exclamation-triangle"></span>
207-
The metadata for this dataset is not complete.
208-
</div>
209-
</div>
202+
</td>
210203
}
204+
<td>
205+
@if (ViewData["IsValid"] == "no")
206+
{
207+
<div id="view-warning-container">
208+
<div id="view-warning" class="alert alert-danger" role="alert" style="width: 100%;">
209+
<span id="view-warning-icon" class=" fa fa-exclamation-triangle"></span>
210+
The metadata for this dataset is not complete.
211+
</div>
212+
</div>
213+
}
211214

212-
</td>
215+
</td>
213216

214-
<td id="form_message_container_Column" style="text-align: right">
215-
<span id="form_message"></span>
216-
<div id="preloader_cotainer">
217-
@*<script type="text/javascript">$("#preloader_cotainer").preloader(20, "Loading metadata...")</script>*@
218-
</div>
219-
<div id="show_help_all"><button type="button" title="Show all help information." class="bx-function bx-disabled fa fa-info " onclick="showHelpAll();"></button></div>
220-
<div id="hide_help_all"><button type="button" title="Hide all help information." class="bx-function bx-disabled" onclick="hideHelpAll();"><i class="fa bx-info" id="help_container"></i><i class="fa fa-ban" id="help_nested"></i></button></div>
217+
<td id="form_message_container_Column" style="text-align: right">
218+
<span id="form_message"></span>
219+
<div id="preloader_cotainer">
220+
@*<script type="text/javascript">$("#preloader_cotainer").preloader(20, "Loading metadata...")</script>*@
221+
</div>
222+
<div id="show_help_all"><button type="button" title="Show all help information." class="bx-function bx-disabled fa fa-info " onclick="showHelpAll();"></button></div>
223+
<div id="hide_help_all"><button type="button" title="Hide all help information." class="bx-function bx-disabled" onclick="hideHelpAll();"><i class="fa bx-info" id="help_container"></i><i class="fa fa-ban" id="help_nested"></i></button></div>
221224

222-
<span id="preloaderContainer" style="float: right"></span>
223-
</td>
225+
<span id="preloaderContainer" style="float: right"></span>
226+
</td>
224227

225-
</tr>
228+
</tr>
226229
</table>
227230
</div>
228231

0 commit comments

Comments
 (0)