Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<Compile Include="Controllers\API\DataInController.cs" />
<Compile Include="Controllers\API\DatasetInController.cs" />
<Compile Include="Controllers\API\MetadataInController.cs" />
<Compile Include="Controllers\ComponentConfigController.cs" />
<Compile Include="Controllers\CreateController.cs" />
<Compile Include="Controllers\EditController.cs" />
<Compile Include="Controllers\EntityTemplatesController.cs" />
Expand Down Expand Up @@ -468,6 +469,7 @@
<Content Include="Views\Form\_metadataParameterViewOffline.cshtml" />
<Content Include="Web.config" />
<Content Include="Views\Form\_displayname.cshtml" />
<Content Include="Views\ComponentConfig\Index.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@ public void GenerateSeedData()

#endregion entity template

#region New Metadata Edit, Config and View
// TODO add to feature
operationManager.Create("DCM", "ComponentConfig", "*");
// operationManager.Create("DCM", "MetadateEdit", "*");

#endregion

#region public available

//because of reuse in ddm this controller must be public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
"type": "Boolean",
"description": "If set to true, the minor version tag can be assigned to dataset versions to display changes in more detail."
},
{
"key": "curator_required_for_tags",
"title": "Manage release tags requires curator",
"value": false,
"type": "Boolean",
"description": "If set to true, only curators can edit and set tags. Users can only send a request."
},
{
"key": "search_result_presentation",
"title": "Search Result Presentation",
Expand Down Expand Up @@ -82,18 +89,18 @@
"description": "Group name all curators assigned to. This is needed for the curation tool to know who is curator."
},
{
"key": "curation",
"title": "Configuration Settings for Curation",
"value": {
"curationLabels": [
{
"name": "custom-label-1",
"color": "#ff0000"
}
]
},
"type": "JSON",
"description": "Customize the labels that can be used in the curation. \nExample: \"curationLabels\": [ { \"name\": \"custom-label-1\", \"color\": \"#ff0000\" }, ... ]"
"key": "curation",
"title": "Configuration Settings for Curation",
"value": {
"curationLabels": [
{
"name": "custom-label-1",
"color": "#ff0000"
}
]
},
"type": "JSON",
"description": "Customize the labels that can be used in the curation. \nExample: \"curationLabels\": [ { \"name\": \"custom-label-1\", \"color\": \"#ff0000\" }, ... ]"
}

]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public HttpResponseMessage Get(long id)

ApiDatasetHelper apiDatasetHelper = new ApiDatasetHelper();
// get content
ApiDatasetModel datasetModel = apiDatasetHelper.GetContent(datasetVersion, id, versionNumber, dataset.MetadataStructure.Id, dataStructureId);
ApiDatasetModel datasetModel = apiDatasetHelper.GetContent(datasetVersion, id, versionNumber, dataset.MetadataStructure.Id, dataStructureId, dataset.EntityTemplate.Id);
var datastructureId = dataset.DataStructure==null?0: dataset.DataStructure.Id;

// get links
Expand Down Expand Up @@ -283,7 +283,7 @@ private HttpResponseMessage get(long id, long versionId)

ApiDatasetHelper apiDatasetHelper = new ApiDatasetHelper();
// get content
ApiDatasetModel datasetModel = apiDatasetHelper.GetContent(datasetVersion, id, version, metadataStructureId, dataset.DataStructure.Id);
ApiDatasetModel datasetModel = apiDatasetHelper.GetContent(datasetVersion, id, version, metadataStructureId, dataset.DataStructure.Id, dataset.EntityTemplate.Id);


EntityReferenceHelper entityReferenceHelper = new EntityReferenceHelper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public ActionResult GenerateZip(long id, long versionid, string format,bool with
// manifest
ApiDatasetHelper apiDatasetHelper = new ApiDatasetHelper();
// get content
ApiDatasetModel apimodel = apiDatasetHelper.GetContent(datasetVersion, id, datasetVersionNumber, datasetVersion.Dataset.MetadataStructure.Id, dataStructureId);
ApiDatasetModel apimodel = apiDatasetHelper.GetContent(datasetVersion, id, datasetVersionNumber, datasetVersion.Dataset.MetadataStructure.Id, dataStructureId, datasetVersion.Dataset.EntityTemplate.Id);
GeneralMetadataModel datasetModel = GeneralMetadataModel.Map(apimodel);

datasetModel.DownloadInformation.DownloadDate = DateTime.Now.ToString(new CultureInfo("en-US"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace BExIS.Modules.Dim.UI.Helpers
{
public class ApiDatasetHelper
{
public ApiDatasetModel GetContent(DatasetVersion datasetVersion, long id, int versionNumber, long metadataStructureId, long dataStructureId)
public ApiDatasetModel GetContent(DatasetVersion datasetVersion, long id, int versionNumber, long metadataStructureId, long dataStructureId, long entityTemplateId)
{
ApiDatasetModel datasetModel = new ApiDatasetModel()
{
Expand All @@ -33,7 +33,8 @@ public ApiDatasetModel GetContent(DatasetVersion datasetVersion, long id, int ve
Title = datasetVersion.Title,
Description = datasetVersion.Description,
DataStructureId = dataStructureId,
MetadataStructureId = metadataStructureId
MetadataStructureId = metadataStructureId,
EntityTemplateId = entityTemplateId
};

Dictionary<string, List<XObject>> objects = new Dictionary<string, List<XObject>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ApiDatasetModel
public string Description { get; set; }
public long DataStructureId { get; set; }
public long MetadataStructureId { get; set; }
public long EntityTemplateId { get; set; }
public bool IsPublic { get; set; }
public string PublicationDate { get; set; }
//public string VersionName { get; set; }
Expand Down