You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/06/07 20:53:01 UTC
[airavata-php-gateway] 02/03: File download unavailable icon/tooltip
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git
commit 9b86f0d83077d0a16ab3337f5a94abfc6053a920
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Thu Jun 7 16:51:52 2018 -0400
File download unavailable icon/tooltip
---
app/libraries/ExperimentUtilities.php | 9 +++++----
app/views/partials/experiment-info.blade.php | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 7ccbb1c..dca71f7 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -27,6 +27,7 @@ use Airavata\Model\Group\ResourcePermissionType;
class ExperimentUtilities
{
+ const FILE_UNAVAILABLE_ICON_TOOLTIP = ' <span class="glyphicon glyphicon-warning-sign" data-toggle="tooltip" data-placement="right" title="File is not available for download."></span></p>';
private static $experimentPath;
private static $relativeExperimentDataDir;
@@ -104,7 +105,7 @@ class ExperimentUtilities
echo '<p>' . $input->name . ': <a target="_blank" href="' . URL::to("/") . '/download/?id='
. $input->value . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
} else {
- echo '<p>' . $input->name . ': ' . $fileName . '</p>';
+ echo '<p>' . $input->name . ': ' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
}
}else if($input->type == DataType::URI_COLLECTION) {
@@ -131,7 +132,7 @@ class ExperimentUtilities
$optFilesHtml = $optFilesHtml . '<a target="_blank" href="' . URL::to("/") . '/download/?id='
. $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a> ';
} else {
- $optFilesHtml = $optFilesHtml . $fileName . ' ';
+ $optFilesHtml = $optFilesHtml . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
}
}
@@ -981,7 +982,7 @@ class ExperimentUtilities
. '/download/?id=' . urlencode($output->value) . '">' . $fileName
. ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
} else {
- echo '<p>' . $output->name . ': ' . $fileName . ' </p>';
+ echo '<p>' . $output->name . ': ' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP . ' </p>';
}
}else {
$fileName = basename($output->value);
@@ -990,7 +991,7 @@ class ExperimentUtilities
. '/download/?id=' . urlencode($output->value) . '">' . $fileName
. ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
} else {
- echo '<p>' . $output->name . ': ' . $fileName . ' </p>';
+ echo '<p>' . $output->name . ': ' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP . ' </p>';
}
}
}
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index ecc71b4..e174900 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -446,6 +446,7 @@
}
return false;
});
+ $('[data-toggle="tooltip"]').tooltip();
</script>
--
To stop receiving notification emails like this one, please contact
machristie@apache.org.