% if(metricName != 'undefined') { var metrics = ['Citations', 'Downloads', 'Views']; var metricIndex = metrics.indexOf(metricName); var iconArrays = ['icon-quote-right', 'icon-cloud-download', 'icon-eye-open']; var metricIcon = iconArrays[metricIndex]; // Implementing a circular queue for the modal footer var prevMetricName = metrics[((metricIndex + metrics.length - 1) % metrics.length)]; var nextMetricName = metrics[((metricIndex + metrics.length + 1) % metrics.length)]; } %>