Merge branch 'handle-deleted-files' into develop
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index b5c2100..dca71f7 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -27,6 +27,7 @@
 
 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;
@@ -99,8 +100,13 @@
                         $fileName = basename($input->value);
                     }
 
-                    echo '<p>' . $input->name . ':&nbsp;<a target="_blank" href="' . URL::to("/") . '/download/?id='
-                        . $input->value . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                    $path = parse_url($currentInputPath)['path'];
+                    if(file_exists($path)){
+                        echo '<p>' . $input->name . ':&nbsp;<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 . ':&nbsp;' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
+                    }
 
                 }else if($input->type == DataType::URI_COLLECTION) {
                     $uriList = $input->value;
@@ -121,8 +127,13 @@
                             $fileName = basename($input->value);
                         }
 
-                        $optFilesHtml = $optFilesHtml . '<a target="_blank" href="' . URL::to("/") . '/download/?id='
-                            . $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a>&nbsp;';
+                        $path = parse_url($currentInputPath)['path'];
+                        if(file_exists($path)){
+                            $optFilesHtml = $optFilesHtml . '<a target="_blank" href="' . URL::to("/") . '/download/?id='
+                                . $uri . '">' . $fileName . ' <span class="glyphicon glyphicon-new-window"></span></a>&nbsp;';
+                        } else {
+                            $optFilesHtml = $optFilesHtml . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP;
+                        }
 
                     }
 
@@ -965,17 +976,23 @@
                             }
                         }
                         $path = parse_url($currentOutputPath)['path'];
+                        $fileName = basename($currentOutputPath);
                         if(file_exists($path)){
-                            $fileName = basename($currentOutputPath);
                             echo '<p>' . $output->name . ':&nbsp;<a target="_blank" href="' . URL::to("/")
                                 . '/download/?id=' . urlencode($output->value) . '">' . $fileName
                                 . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                        } else {
+                            echo '<p>' . $output->name . ':&nbsp;' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP . ' </p>';
                         }
                     }else {
                         $fileName = basename($output->value);
-                        echo '<p>' . $output->name . ':&nbsp;<a target="_blank" href="' . URL::to("/")
-                            . '/download/?id=' . urlencode($output->value) . '">' . $fileName
-                            . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                        if(file_exists($path)){
+                            echo '<p>' . $output->name . ':&nbsp;<a target="_blank" href="' . URL::to("/")
+                                . '/download/?id=' . urlencode($output->value) . '">' . $fileName
+                                . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                        } else {
+                            echo '<p>' . $output->name . ':&nbsp;' . $fileName . self::FILE_UNAVAILABLE_ICON_TOOLTIP . ' </p>';
+                        }
                     }
                 }
             } elseif ($output->type == DataType::STRING) {
diff --git a/app/views/partials/auto-provisioned-accounts.blade.php b/app/views/partials/auto-provisioned-accounts.blade.php
index 58a3a29..cd92941 100644
--- a/app/views/partials/auto-provisioned-accounts.blade.php
+++ b/app/views/partials/auto-provisioned-accounts.blade.php
@@ -41,8 +41,13 @@
                                 @endif
                             </td>
                             <td>{{{ $auto_provisioned_account["hostname"] }}}</td>
-                            {{-- Not escaping HTML to allow Gateway Admin to put HTML into additionalInfo field --}}
-                            <td>{{ $auto_provisioned_account["additionalInfo"] }}</td>
+                            <td>
+                            {{-- Only display additional info if account isn't completely setup --}}
+                            @if ($auto_provisioned_account["userComputeResourcePreference"] == null || !$auto_provisioned_account["userComputeResourcePreference"]->validated)
+                                {{-- Not escaping HTML to allow Gateway Admin to put HTML into additionalInfo field --}}
+                                {{ $auto_provisioned_account["additionalInfo"] }}
+                            @endif
+                            </td>
                             <td>{{{ $auto_provisioned_account["errorMessage"] }}}</td>
                         </tr>
                     @endforeach
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index b910aea..e174900 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -72,7 +72,7 @@
                     echo $expVal["applicationInterface"]->applicationName;
                 } ?></td>
         </tr>
-        <tr>
+        <tr class="compute-resource-summary-page">
             <td><strong>Compute Resource</strong></td>
             <td><?php if (!empty($expVal["computeResource"])) {
                     echo $expVal["computeResource"]->hostName;
@@ -162,19 +162,19 @@
             <td><strong>Last Modified Time</strong></td>
             <td class="time" unix-time="{{ $expVal["experimentTimeOfStateChange"] }}"></td>
         </tr>
-        <tr>
+        <tr class="wall-time-summary-page">
             <td><strong>Wall Time</strong></td>
             <td>{{ $experiment->userConfigurationData->computationalResourceScheduling->wallTimeLimit }}</td>
         </tr>
-        <tr>
+        <tr class="cpu-count-summary-page">
             <td><strong>CPU Count</strong></td>
             <td>{{ $experiment->userConfigurationData->computationalResourceScheduling->totalCPUCount }}</td>
         </tr>
-        <tr>
+        <tr class="node-count-summary-page">
             <td><strong>Node Count</strong></td>
             <td>{{ $experiment->userConfigurationData->computationalResourceScheduling->nodeCount }}</td>
         </tr>
-        <tr>
+        <tr class="queue-summary-page">
             <td><strong>Queue</strong></td>
             <td>{{ $experiment->userConfigurationData->computationalResourceScheduling->queueName }}</td>
         </tr>
@@ -446,6 +446,7 @@
         }
         return false;
     });
+    $('[data-toggle="tooltip"]').tooltip();
 </script>
 
 
diff --git a/public/js/filemanager.js b/public/js/filemanager.js
index 7f241dc..f6f675a 100644
--- a/public/js/filemanager.js
+++ b/public/js/filemanager.js
@@ -94,10 +94,10 @@
         var icon_class, name_link;
         if (f.folder) {
             icon_class = 'glyphicon glyphicon-folder-open';
-            name_link = '<a href="#" onclick=dir_click("' + f.link + '")>&nbsp;' + f.name + "</a>";
+            name_link = '<a href="#" onclick=dir_click(' + JSON.stringify(f.link) + ')>&nbsp;' + f.name + "</a>";
         } else {
             icon_class = 'glyphicon glyphicon-save-file';
-            name_link = '<a href="../download?path=' + f.link + '">&nbsp;' + f.name + '</a>';
+            name_link = '<a href="../download?path=' + encodeURIComponent(f.link) + '">&nbsp;' + f.name + '</a>';
         }
 
         html += '<tr>'