-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Arkivenhet.cshtml
385 lines (356 loc) · 21.2 KB
/
_Arkivenhet.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
@using Riksarkivet.BusinessClasses.MOA
@using Riksarkivet.Web.Applications.MOA.Models
@using Riksarkivet.BusinessClasses.MOA.Domain
@model Arkivenhet
@{
var arkivenhet = Model as Arkivenhet;
}
@*@if(!Model.IsPartialAjax)
{
<script type="text/javascript">
$(function () {
MOA.init_Arkivenhet({
isPartialAjax: @(Model.IsPartialAjax ? "true" : "false"),
id: '@Model.Id',
auktReferenskod: '@ViewBag.AuktoritetensReferenskod',
agarGruppUppgifterUrl: '@Url.Action("GetAgargruppUppgifter")',
raderaUrl: '@Url.Action("Radera", new { id = Model.Id })',
validateSessionUrl: '@Url.Action("ValidateSession", "Arkivenhet")',
typKod: "@Model.TypKod",
tillhorArkivId: "@Model.TillhörArkivId",
imagePath: "@Url.Content("~/Content/images/arkivenheter/small/")",
canEdit: @(Model.CanEdit ? "true" : "false"),
id : "@Model.Id",
isNew : @(Model.IsNew ? "true" : "false"),
arkivPath:"@Url.Action("Index", "Arkiv", new { id = "" })",
auktoritetPath:"@Url.Action("Index", "person-institution", new { id = "" })"
});
});
</script>
}*@
@*@if(Model.CanEdit){
<script type="text/javascript">
$(function(){
setTimeout('SetFocusOnFirstFormInputElement()', 500);
});
function SetFocusOnFirstFormInputElement() {
$("form[id='arkivenhet-form'] input[type!=hidden]:first").focus();
}
</script>
}*@
<div id="ArkivAccordion" class="accordion-wrapper" ng-controller="ArkivenhetController">
<div class="accordion-content">
<div class="accordion-header"><div class="label">@ViewBag.Legend</div></div>
<div class="accordion-content-part">
<div class="col-3">
@Html.ÄndradUppdateradAv(arkivenhet.SenastÄndradInfo, arkivenhet.SkapadInfo)
</div>
<div class="cols col-2">
<div>
@Html.Label("Referenskod aktuell nivå", new { @for = "Kortreferens" })
@Html.TextBox("Kortreferens", null, new { ng_model = "model.Arkivenhet.ReferenskodAktuellNiva" })
@Html.ValidationMessageFor(m => m.ReferenskodAktuellNiva)
</div>
<div id="referenskodBas">
<label>Referenskod</label>
<span id="Referenskod" class="display-field">{{model.Arkivenhet.ReferenskodBas}}/<span id="kortref"></span>{{model.Arkivenhet.ReferenskodAktuellNiva}}</span>
</div>
</div>
<div class="postBreakLine">
<div class="nyInformationsRad arkivenhetTitel">
<div class="innehall">
@Html.Label("Titel", new { @for = "Titel" })
@Html.TextArea("Titel", new { @class = "arkivenhetTitel", rows = 1, ng_model = "model.Arkivenhet.Titel" })
@Html.ValidationMessageFor(m => m.Titel)
</div>
</div>
<div class="nyInformationsRad">
@Html.Label("Status för visning")
<select ng-model="model.Arkivenhet.ArkivenhetStatus.Id" ng-options="item.Key as item.Value for item in dropdownlistor.arkivstatus"></select>
@*@(Html.DropDownListFor(model => model.ArkivenhetStatus.Id, new SelectList(Model.GetSorteradStatusLista(Model.ArkivenhetStatus.Id, Model.IsNew), "Key", "Value", Model.ArkivenhetStatus.Id), new { id = "ArkivenhetStatusDropDown", @class = "arkivenhetDropBox " }))*@
</div>
</div>
@if (!Model.IsNew)
{
<div class="nyInformationsRad postBreakLine">
@Html.Partial("_ArkivenhetDatering", Model)
</div>
}
<div class="nyInformationsRad postBreakLine">
@Html.LabelFor(m => m.ExtraId, new { @for = "ExtraId" })
@Html.TextBox("ExtraId", null, new { ng_model = "model.Arkivenhet.ExtraId" })
</div>
<div class="nyInformationsRad">
@Html.LabelFor(m => m.ForteckningsStatus)
<select ng-model="model.Arkivenhet.ForteckningsStatus.Id" ng-options="item.Key as item.Value for item in dropdownlistor.forteckningstatus"></select>
@*@(Html.DropDownListFor(model => model.ForteckningsStatus.Id, new SelectList(Model.GetSorteradList(Model.ForteckningsStatus.Id, Model.IsNew), "Key", "Value", Model.ForteckningsStatus.Id), new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="nyInformationsRad postBreakLine">
@Html.LabelFor(m => m.nivaspecifikation)
@*@Html.TextBoxFor(m => m.nivaspecifikation)*@
@Html.TextBox("nivaspecifikation", null, new { ng_model = "model.Arkivenhet.nivaspecifikation" })
</div>
<div class="nyInformationsRad">
@Html.LabelFor(m => m.ForvaringId)
<select class="arkivenhetDropBox" ng-model="model.Arkivenhet.ForvaringId" ng-options="item.Key as item.Value for item in dropdownlistor.forvaring"></select>
@*@(Html.DropDownListFor(model => model.ForvaringId, ViewBag.Forvaring as List<SelectListItem>, new { id = "ArkivenhetForvaring", @class = "arkivenhetDropBox " }))*@
</div>
@if (!Model.IsNew)
{
<div class="nyInformationsRad postBreakLine">
@Html.Partial("_ArkivenhetOmfang", Model)
</div>
}
<div class="nyInformationsRad postBreakLine">
@Html.LabelFor(m => m.ArkivenhetTyp)
<select ng-model="model.Arkivenhet.ArkivenhetTyp.Id" ng-options="item.Key as item.Value for item in dropdownlistor.arkivenhetstyp"></select>
@*@(Html.DropDownListFor(model => model.ArkivenhetTyp.Id, ViewBag.ArkivenhetsTyper as List<SelectListItem>, new { id = "ArkivenhetTypDropDown", @class = "arkivenhetDropBox " }))*@
</div>
<div class="nyInformationsRad postBreakLine">
@{ var ägargrupper = ViewBag.Ägaregrupper as List<SelectListItem>; }
@if (Model.CanEdit && Model.IsTopparkiv)
{
@Html.LabelFor(m => m.Agare)
<select ng-model="model.Arkivenhet.Agare" ng-options="item.Key as item.Value for item in guidDropdownlistor.agare" ng-disabled="{{Arkivenhet.IsToppArkiv}}"></select>
@*@(Html.DropDownListFor(model => model.Ägare, ägargrupper, new { id = "AgarGrupperDropDown", @class = "arkivenhetDropBox " }))*@
}
</div>
<div class="nyInformationsRad postBreakLine">
@Html.LabelFor(model => model.Arkivinstitution)
<span id="Arkivinstitution" class="display-field">
@*@Model.Arkivinstitution*@
{{model.Arkivenhet.Arkivinstitution}}
</span>
</div>
<div id="sortera" class="nyInformationsRad postBreakLine">
@Html.LabelFor(model => model.Sortering, "Sortering underordnade arkivenheter")
<select ng-model="model.Arkivenhet.Sortering" ng-options="item.Key as item.Value for item in dropdownlistor.sortering"></select>
@*@(Html.DropDownListFor(m => m.Sortering, new SelectList(Kodtabeller.Sorteringstyp, "Key", "Value", Model.Sortering == null ? ModelDefaultValues.SortingType.ToString() : Model.Sortering.Value.ToString()), new { @class = "arkivenhetDropBox " }))*@
</div>
</div>
</div>
<div class="accordion-content">
<div class="accordion-header"><div class="label">Innehåll</div></div>
<div class="accordion-content-part">
<div class="cols col-2">
<div class="innehall">
@Html.LabelFor(m => m.Syfte)
<div class="container">
<div class="row">
<div>
@Html.TextArea("Syfte", new { rows = 1, ng_model = "model.Arkivenhet.Syfte" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_SyfteOchInnehall.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.arkivbanm)
<div class="container">
<div class="row">
<div>
@Html.TextArea("arkivbanm", new { rows = 1 , ng_model = "model.Arkivenhet.arkivbanm" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_Arkivhistorik.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.struktur)
<div class="container">
<div class="row">
<div>
@Html.TextArea("struktur", new { rows = 1, ng_model = "model.Arkivenhet.struktur" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_OrdningOchStruktur.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.allmanm)
<div class="container">
<div class="row">
<div>
@Html.TextArea("allmanm", new { rows = 1, ng_model = "model.Arkivenhet.allmanm" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_AllmanAnmarkning.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.admanm)
<div class="container">
<div class="row">
<div>
@Html.TextArea("admanm", new { rows = 1, ng_model = "model.Arkivenhet.admanm" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_InternaAnmarkning.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.historik)
<div class="container">
<div class="row">
<div>
@Html.TextArea("historik", new { rows = 1, ng_model = "model.Arkivenhet.historik" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_InledningAldreForm.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
@Html.LabelFor(m => m.kallor)
<div class="container">
<div class="row">
<div>
@Html.TextArea("kallor", new { rows = 1, ng_model = "model.Arkivenhet.kallor" })
</div>
<div class="right">
<img width="12" height="12" class="hjalpIkon" title="@Html.Partial("~/Redaktor/Tooltip/_AnmarkningPostensUpprattande.cshtml")" [email protected]("~/Content/images/info.png") alt="Info" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Tillgänglighet</div>
</div>
<div class="accordion-content-part">
<div class="divTable">
<div class="divRow">
<div class="divCell">
@Html.LabelFor(m => m.VillkorId)
<select ng-model="model.Arkivenhet.VillkorId" ng-options="item.Key as item.Value for item in dropdownlistor.villkor" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.VillkorId, ViewBag.VillkorList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.TillstandsgivareId)
<select ng-model="model.Arkivenhet.TillstandsgivareId" ng-options="item.Key as item.Value for item in dropdownlistor.tgivare" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.TillstandsgivareId, ViewBag.TillstandsGivareList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.UpphovsrattId)
<select ng-model="model.Arkivenhet.UpphovsrattId" ng-options="item.Key as item.Value for item in dropdownlistor.upphov" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.UpphovsrattId, ViewBag.UpphovsrattList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
</div>
<div class="divRow">
<div class="divCell">
@Html.LabelFor(m => m.SekretessId)
<select ng-model="model.Arkivenhet.SekretessId" ng-options="item.Key as item.Value for item in dropdownlistor.sekretess" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.SekretessId, ViewBag.SekretessList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.PersonuppgiftPULId)
<select ng-model="model.Arkivenhet.PersonuppgiftPULId" ng-options="item.Key as item.Value for item in dropdownlistor.personpul" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.PersonuppgiftPULId, ViewBag.PersonuppgiftPULList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.RestriktionerPULId)
<select ng-model="model.Arkivenhet.RestriktionerPULId" ng-options="item.Key as item.Value for item in dropdownlistor.restriktioner" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.RestriktionerPULId, ViewBag.RestriktionerPULList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
</div>
<div class="divRow">
<div class="divCell">
@Html.LabelFor(m => m.PulRegelId)
<select ng-model="model.Arkivenhet.PulRegelId" ng-options="item.Key as item.Value for item in dropdownlistor.pulregel" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.PulRegelId, ViewBag.PulRegelList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.DepositionId)
<select ng-model="model.Arkivenhet.DepositionId" ng-options="item.Key as item.Value for item in dropdownlistor.deposition" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.DepositionId, ViewBag.DepositionList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
<div class="divCell">
@Html.LabelFor(m => m.VardbehovId)
<select ng-model="model.Arkivenhet.VardbehovId" ng-options="item.Key as item.Value for item in dropdownlistor.vardbehov" class="arkivenhetDropBox"></select>
@*@(Html.DropDownListFor(model => model.VardbehovId, ViewBag.VardbehovList as List<SelectListItem>, new { @class = "arkivenhetDropBox " }))*@
</div>
</div>
<div class="divRow">
<div class="divCell">
<div class="innehall">
@Html.LabelFor(m => m.VillkorAnmarkning)
@Html.TextArea("VillkorAnmarkning", new { rows = 1, ng_model = "model.Arkivenhet.VillkorAnmarkning" })
</div>
</div>
</div>
<div class="divRow">
<div class="divCell">
<div class="innehall">
@Html.LabelFor(m => m.FyskiskaTekniskaVillkorAnmarkning)
@Html.TextArea("FyskiskaTekniskaVillkorAnmarkning", new { rows = 1, ng_model = "model.Arkivenhet.FyskiskaTekniskaVillkorAnmarkning" })
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Hänvisning till arkivenhet</div>
@Html.Partial("_ArkivenhetArkivenhetKnappar", Model)
</div>
<div class="accordion-content-part grid">
@Html.Partial("_ArkivenhetArkivenhet", Model)
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Ämnesordshänvisning</div>
@Html.Action("GridKnappar", "Arkivenhet", new { gridNamn = "arkivenhetamnesord", canEdit = Model.CanEdit })
</div>
<div class="accordion-content-part grid">
@Html.Action("Grid", "Arkivenhet", new { gridNamn = "arkivenhetamnesord", canEdit = Model.CanEdit })
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Topografihänvisningar</div>
@Html.Action("GridKnappar", "Arkivenhet", new { gridNamn = "arkivenhettopografi", canEdit = Model.CanEdit })
</div>
<div class="accordion-content-part grid">
@Html.Action("Grid", "Arkivenhet", new { gridNamn = "arkivenhettopografi", canEdit = Model.CanEdit })
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Externa hänvisningar</div>
@Html.Action("GridKnappar", "Arkivenhet", new { gridNamn = "arkivenhetextern", canEdit = Model.CanEdit })
</div>
<div class="accordion-content-part grid">
@Html.Action("Grid", "Arkivenhet", new { gridNamn = "arkivenhetextern", canEdit = Model.CanEdit })
</div>
</div>
<div class="accordion-content" ng-show="model.Arkivenhet.KanHaAuktoritetshanvisningar">
<div class="accordion-header" ng-switch on="model.Arkivenhet.ArkivenhetTyp.Id">
<div class="label" ng-switch-when="@KodArkivenhetTyp.Arkiv">Hänvisning till arkivbildare</div>
<div class="label" ng-switch-default>Hänvisning till upphovsperson/brevskrivare</div>
@Html.Partial("_ArkivenhetAuktoritetKnappar", Model)
</div>
<div class="accordion-content-part grid">
@Html.Partial("_ArkivenhetAuktoritet", Model)
</div>
</div>
<div class="accordion-content">
<div class="accordion-header">
<div class="label">Hänvisning till placering</div>
@Html.Action("GridKnappar", "Arkivenhet", new { gridNamn = "arkivenhetplacering", canEdit = Model.CanEdit })
</div>
<div class="accordion-content-part grid">
@Html.Action("Grid", "Arkivenhet", new { gridNamn = "arkivenhetplacering", canEdit = Model.CanEdit })
</div>
</div>
</div>
@Html.Partial("_HiddenFields", Model)
@*<script type="text/javascript">
$(document).ready(function () {
if (!@(Model.CanEdit ? "true" : "false"))
$('fieldset').find('Html.DropDownListFor, input, Label, textarea, select').attr('disabled', true)
});
</script>*@