Skip to content

Commit

Permalink
#581 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBlaa committed Jun 5, 2020
1 parent 8c6c530 commit e1f9302
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions Console/BExIS.Web.Shell/Areas/DDM/Views/Data/ShowData.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
}
</div>
</div>

@if (@Model != null)
{
if (ViewData.ModelState.IsValid)
Expand All @@ -158,22 +157,28 @@
.Text("Primary Data")
.LoadContentFrom("ShowPrimaryData", "Data", new { area = "ddm", datasetID = @Model.Id, versionId = Model.VersionId })
.HtmlAttributes(new { id = "primarydata" })
.Enabled(@Model.ViewAccess);
//.Enabled(@Model.ViewAccess);
.Enabled(false);

}
if (show_tabs["show_data_structure_tab"] == "true")
{
tabs.Add()
.Text("Data Structure")
.LoadContentFrom("ShowPreviewDataStructure", "Data", new { area = "ddm", datasetID = @Model.Id })
.HtmlAttributes(new { id = "datastructure" });
.HtmlAttributes(new { id = "datastructure" })
.Enabled(false);


}
if (show_tabs["show_link_tab"] == "true")
{
tabs.Add()
.Text("Links")
.LoadContentFrom("ShowReferences", "Data", new { area = "ddm", id = @Model.Id, version = Model.Version })
.HtmlAttributes(new { id = "showreferences" });
.HtmlAttributes(new { id = "showreferences" })
.Enabled(false);

}

if (show_tabs["show_permission_tab"] == "true" && !(show_tabs["show_tabs_deactivated"] == "false" && @Model.GrantAccess == false))
Expand All @@ -182,15 +187,18 @@
.Text("Dataset Permissions")
.LoadContentFrom("DatasetPermissions", "Data", new { area = "ddm", datasetId = @Model.Id })
.HtmlAttributes(new { id = "datapermissions" })
.Enabled(@Model.GrantAccess);
//.Enabled(@Model.GrantAccess);
.Enabled(false);

}
if (show_tabs["show_publish_tab"] == "true" && !(show_tabs["show_tabs_deactivated"] == "false" && @Model.ViewAccess == false))
{
tabs.Add()
.Text("Publish")
//.Content(@Html.Render("dim", "Submission", "getPublishDataPartialView", new RouteValueDictionary { { "datasetid", @Model.Id } }).ToHtmlString())
.LoadContentFrom("getPublishDataPartialView", "Submission", new { area = "dim", datasetId = @Model.Id })
.Enabled(@Model.ViewAccess)
//.Enabled(@Model.ViewAccess)
.Enabled(false)
.HtmlAttributes(new { id = "prepare" });
}
if (show_tabs["show_attachments_tab"] == "true" && !(show_tabs["show_tabs_deactivated"] == "false" && @Model.ViewAccess == false))
Expand All @@ -199,7 +207,9 @@
.Text("Attachments")
.LoadContentFrom("DatasetAttachements", "Attachments", new { area = "dcm", datasetId = @Model.Id, versionId = Model.VersionId })
.HtmlAttributes(new { id = "attachements" })
.Enabled(@Model.ViewAccess);
//.Enabled(@Model.ViewAccess);
.Enabled(false);


}
})
Expand All @@ -210,7 +220,6 @@
@Html.ValidationSummary(true);
}
}

<script type="text/javascript">
function grid_subjects_onDataBound() {
Expand Down Expand Up @@ -240,6 +249,8 @@
$(document).ready(function () {
console.log("ready");
$("#preloaderContainer").preloader(20, "Loading...");
resetAllTelerikIconTitles();
Expand All @@ -255,7 +266,9 @@
})
})
$(document).bind("MetadataFormIsReady", function () {
$(document).bind("MetadataFormIsReady", function () {
console.log("metadata ready");
//alert("m is ready");
var viewAccess = '@Model.ViewAccess';
var grantAccess = '@Model.GrantAccess';
Expand All @@ -265,14 +278,14 @@
//console.log(viewAccess);
//console.log(grantAccess);
$("li#datastructure").removeClass("t-state-disabled");
$("li#datastructure").removeClass("t-state-disabled");
$("li#showreferences").removeClass("t-state-disabled");
//console.log($(tabStrip).find("li #datastructure"));
if (viewAccess === "True") {
$("li#primarydata").removeClass("t-state-disabled");
$("li#prepare").removeClass("t-state-disabled");
$("li#attachements").removeClass("t-state-disabled");
$("li#showreferences").removeClass("t-state-disabled");
$("li#attachements").removeClass("t-state-disabled");
}
Expand Down

0 comments on commit e1f9302

Please sign in to comment.