Skip to content
Snippets Groups Projects
Commit db701cda authored by Sol Villar's avatar Sol Villar Committed by NuCivic Devops
Browse files

Removed datastore warnings from teaser views.

parent 40ca7963
No related branches found
No related tags found
No related merge requests found
......@@ -312,8 +312,8 @@ function dkan_datastore_node_view($node, $view_mode, $langcode) {
$type = dkan_datastore_node_type();
if ($node->type == $type) {
$status = dkan_datastore_status($node);
if (user_access('manage datastore') && $status = dkan_datastore_status($node)) {
if ($status == DKAN_DATASTORE_FILE_EXISTS) {
if (user_access('manage datastore') && ($status = dkan_datastore_status($node)) && $view_mode == 'full') {
if ($status === DKAN_DATASTORE_FILE_EXISTS) {
drupal_set_message(t('Your file for this resource is not added to the datastore. Click "Manage Datastore" to import file into the datastore.'));
}
elseif ($status == DKAN_DATASTORE_EXISTS) {
......@@ -532,4 +532,4 @@ function dkan_datastore_node_presave($node) {
$wrap = entity_metadata_wrapper('node', $node);
$wrap->field_datastore_status->set(dkan_datastore_status($node));
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment