Commit 74fe84ef authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add bootstrap tab

parent effe9b6f
......@@ -62,7 +62,7 @@ class tx_nG6_pi1 extends tslib_pibase {
// Add the ng6 plugins css
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.cookie.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.hotkeys.js"></script>
......
......@@ -126,172 +126,171 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
<br />
{* If there is some runs to display *}
<h3> {$llang.runs_done} </h3>
<div class="underline"> </div>
<br />
{* Find out if the current user is super user of a run *}
{if $projects[key($projects)].is_admin}
{assign var="is_at_least_admin_of_1_run" value=true}
{else}
{assign var="is_at_least_admin_of_1_run" value=false}
{/if}
{assign var="runs" value=$project_runs}
{include file='run_table.tpl'}
<br />
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#runs" data-toggle="tab">{$llang.runs_done}</a></li>
<li><a href="#analyses" data-toggle="tab">{$llang.analyzes_done}</a></li>
{if $login_user}
<li><a href="#users" data-toggle="tab">{$llang.manage_users}</a></li>
{/if}
</ul>
{* Find out if an analysis table should be displayed *}
{assign var="display_analysis_result" value=false}
{foreach from=$h_project_analysis key=analysis_id item=analysis_values}
{if $analysis_values.is_admin && $analysis_values.hidden == 1}
{assign var="display_analysis_result" value=true}
{elseif $analysis_values.hidden == 0}
{assign var="display_analysis_result" value=true}
{/if}
{/foreach}
<h3> {$llang.analyzes_done} </h3>
<div class="underline"> </div>
<br />
<table class="display" id="analysis_data_table">
<thead>
<tr>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="runs">
{* Find out if the current user is super user of a run *}
{if $projects[key($projects)].is_admin}
{assign var="is_at_least_admin_of_1_run" value=true}
{else}
{assign var="is_at_least_admin_of_1_run" value=false}
{/if}
{assign var="runs" value=$project_runs}
{include file='run_table.tpl'}
</div>
<div class="tab-pane fade" id="analyses">
{* Find out if an analysis table should be displayed *}
{assign var="display_analysis_result" value=false}
{foreach from=$h_project_analysis key=analysis_id item=analysis_values}
{if $analysis_values.is_admin && $analysis_values.hidden == 1}
{assign var="display_analysis_result" value=true}
{elseif $analysis_values.hidden == 0}
{assign var="display_analysis_result" value=true}
{/if}
{/foreach}
<table class="display" id="analysis_data_table">
<thead>
<tr>
{if $projects[key($projects)].is_admin && $login_user && $display_analysis_result}
<th><center><input type="checkbox" id="chk_all_analysis"></center></th>
{/if}
<th nowrap>{$llang.name}</th>
<th>{$llang.description}</th>
<th>{$llang.software}</th>
<th>{$llang.version}</th>
</tr>
</thead>
<tbody>
{include file="recursive_list_analysis_display.tpl" element=$h_project_analysis prof=0}
</tbody>
{if $projects[key($projects)].is_admin && $login_user && $display_analysis_result}
<th><center><input type="checkbox" id="chk_all_analysis"></center></th>
<tfoot>
<tr>
<th align="left" colspan="5">
{$llang.toolbar_title}
<button id="hide_analysis" type="button" class="btn pill-l"><span><span>{$llang.hide_btn}</span></span></button><button id="unhide_analysis" type="button" class="btn pill-r"><span><span>{$llang.unhide_btn}</span></span></button>
&nbsp;<button id="delete_analysis" type="button" class="btn"><span><span>{$llang.delete_btn}</span></span></button>
</th>
</tr>
</tfoot>
{/if}
<th nowrap>{$llang.name}</th>
<th>{$llang.description}</th>
<th>{$llang.software}</th>
<th>{$llang.version}</th>
</tr>
</thead>
<tbody>
{include file="recursive_list_analysis_display.tpl" element=$h_project_analysis prof=0}
</tbody>
{if $projects[key($projects)].is_admin && $login_user && $display_analysis_result}
<tfoot>
<tr>
<th align="left" colspan="5">
{$llang.toolbar_title}
<button id="hide_analysis" type="button" class="btn pill-l"><span><span>{$llang.hide_btn}</span></span></button><button id="unhide_analysis" type="button" class="btn pill-r"><span><span>{$llang.unhide_btn}</span></span></button>
&nbsp;<button id="delete_analysis" type="button" class="btn"><span><span>{$llang.delete_btn}</span></span></button>
</th>
</tr>
</tfoot>
{/if}
</table>
<br />
{* If the current user is connected *}
{if $login_user}
</table>
</div>
{* Find out if the current user needs comboboxes *}
{assign var="needs_action" value=false}
{foreach from=$project_users key=c_user_id item=user_values}
{if $projects[key($projects)].is_admin && $user_values.id!=$user_id}
{assign var="needs_action" value=true}
{elseif $projects[key($projects)].is_manager && $user_values.id!=$user_id && $user_values.right_id!='2'}
{assign var="needs_action" value=true}
{/if}
{/foreach}
<h3> {$llang.manage_users} </h3>
<div class="underline"> </div>
<br />
<input type="hidden" id="current_project_id" value="{$projects[key($projects)].id}" />
<table class="display" id="users_data_table">
<thead>
<tr>
{if $needs_action}
<th><center><input type="checkbox" id="chk_all_user"></center></th>
{/if}
<th nowrap>{$llang.user_name}</th>
<th>{$llang.lastlogin}</th>
<th>{$llang.cruser}</th>
<th>{$llang.last_name}</th>
<th>{$llang.first_name}</th>
<th>{$llang.email}</th>
<th>{$llang.right}</th>
</tr>
</thead>
<tbody>
{assign var="editable" value="editable"}
{foreach from=$project_users key=c_user_id item=user_values}
{* highlight user personnal line *}
{assign var="emphasis" value=""}
{if $user_values.id==$user_id}
{assign var="emphasis" value="tx-nG6-pi1-line-emphasis"}
{/if}
<tr id="tr_user_{$user_values.id}" class="{$emphasis}">
{if ($projects[key($projects)].is_admin && $user_values.id!=$user_id)
|| ($projects[key($projects)].is_manager && $user_values.id!=$user_id && $user_values.right_id!='2')}
<td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center></td>
{elseif $needs_action}
<td></td>
{if $login_user}
<div class="tab-pane fade" id="users">
{* Find out if the current user needs comboboxes *}
{assign var="needs_action" value=false}
{foreach from=$project_users key=c_user_id item=user_values}
{if $projects[key($projects)].is_admin && $user_values.id!=$user_id}
{assign var="needs_action" value=true}
{elseif $projects[key($projects)].is_manager && $user_values.id!=$user_id && $user_values.right_id!='2'}
{assign var="needs_action" value=true}
{/if}
{/foreach}
<input type="hidden" id="current_project_id" value="{$projects[key($projects)].id}" />
<table class="display" id="users_data_table">
<thead>
<tr>
{if $needs_action}
<th><center><input type="checkbox" id="chk_all_user"></center></th>
{/if}
<td>{$user_values.username}</td>
<td>{$user_values.lastlogin}</td>
<td>{$user_values.cruser_name}</td>
{if $user_values.id==$user_id || $user_values.cruser_id==$user_id }
<td class="{$editable} field=fe_users=last_name">{$user_values.last_name}</td>
<td class="{$editable} field=fe_users=first_name">{$user_values.first_name}</td>
<td class="{$editable} field=fe_users=email">{$user_values.email}</td>
{else}
<td>{$user_values.last_name}</td>
<td>{$user_values.first_name}</td>
<td>{$user_values.email}</td>
<th nowrap>{$llang.user_name}</th>
<th>{$llang.lastlogin}</th>
<th>{$llang.cruser}</th>
<th>{$llang.last_name}</th>
<th>{$llang.first_name}</th>
<th>{$llang.email}</th>
<th>{$llang.right}</th>
</tr>
</thead>
<tbody>
{assign var="editable" value="editable"}
{foreach from=$project_users key=c_user_id item=user_values}
{* highlight user personnal line *}
{assign var="emphasis" value=""}
{if $user_values.id==$user_id}
{assign var="emphasis" value="tx-nG6-pi1-line-emphasis"}
{/if}
<td>
{if $user_values.right_id=='2'}
<select id="cbb_right_level_{$user_values.id}" name="right_level" disabled>
<option value="2" selected="selected">{$llang.right_level_admin}</option>
</select>
<tr id="tr_user_{$user_values.id}" class="{$emphasis}">
{if ($projects[key($projects)].is_admin && $user_values.id!=$user_id)
|| ($projects[key($projects)].is_manager && $user_values.id!=$user_id && $user_values.right_id!='2')}
<td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center></td>
{elseif $needs_action}
<td></td>
{/if}
<td>{$user_values.username}</td>
<td>{$user_values.lastlogin}</td>
<td>{$user_values.cruser_name}</td>
{if $user_values.id==$user_id || $user_values.cruser_id==$user_id }
<td class="{$editable} field=fe_users=last_name">{$user_values.last_name}</td>
<td class="{$editable} field=fe_users=first_name">{$user_values.first_name}</td>
<td class="{$editable} field=fe_users=email">{$user_values.email}</td>
{else}
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager && $user_values.cruser_id==$user_id}
{assign var="disabled" value=""}
<td>{$user_values.last_name}</td>
<td>{$user_values.first_name}</td>
<td>{$user_values.email}</td>
{/if}
<td>
{if $user_values.right_id=='2'}
<select id="cbb_right_level_{$user_values.id}" name="right_level" disabled>
<option value="2" selected="selected">{$llang.right_level_admin}</option>
</select>
{else}
{assign var="disabled" value="disabled"}
{/if}
<select id="cbb_right_level_{$user_values.id}" name="right_level" {$disabled}>
{if $user_values.right_id=='1'}
<option value="1" selected="selected">{$llang.right_level_manager}</option>
{else}
<option value="1">{$llang.right_level_manager}</option>
{/if}
{if $user_values.right_id=='0'}
<option value="0" selected="selected">{$llang.right_level_member}</option>
{else}
<option value="0">{$llang.right_level_member}</option>
{/if}
</select>
{/if}
</td>
</tr>
{/foreach}
</tbody>
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager}
<tfoot>
<tr>
<th align="left" colspan="7">
{$llang.toolbar_title}
<button id="add_user" type="button" class="btn pill-l"><span><span>{$llang.add_user_btn}</span></span></button><button id="del_user" type="button" class="btn pill-r"><span><span>{$llang.delete_user_btn}</span></span></button>
</th>
</tr>
</tfoot>
{/if}
</table>
<br />
<br />
{/if}
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager && $user_values.cruser_id==$user_id}
{assign var="disabled" value=""}
{else}
{assign var="disabled" value="disabled"}
{/if}
<select id="cbb_right_level_{$user_values.id}" name="right_level" {$disabled}>
{if $user_values.right_id=='1'}
<option value="1" selected="selected">{$llang.right_level_manager}</option>
{else}
<option value="1">{$llang.right_level_manager}</option>
{/if}
{if $user_values.right_id=='0'}
<option value="0" selected="selected">{$llang.right_level_member}</option>
{else}
<option value="0">{$llang.right_level_member}</option>
{/if}
</select>
{/if}
</td>
</tr>
{/foreach}
</tbody>
{if $projects[key($projects)].is_admin || $projects[key($projects)].is_manager}
<tfoot>
<tr>
<th align="left" colspan="7">
{$llang.toolbar_title}
<button id="add_user" type="button" class="btn pill-l"><span><span>{$llang.add_user_btn}</span></span></button><button id="del_user" type="button" class="btn pill-r"><span><span>{$llang.delete_user_btn}</span></span></button>
</th>
</tr>
</tfoot>
{/if}
</table>
</div>
{/if}
</div>
{* If multiple projects have to be displayed *}
{else}
......
/*!
* Bootstrap v2.1.0
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
.clearfix:after{clear:both;}
.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
.nav{margin-left:0;margin-bottom:20px;list-style:none;}
.nav>li>a{display:block;}
.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
.nav>.pull-right{float:right;}
.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
.nav li+.nav-header{margin-top:9px;}
.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
.nav-list>li>a{padding:3px 15px;}
.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
.nav-list [class^="icon-"]{margin-right:2px;}
.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
.nav-tabs:after,.nav-pills:after{clear:both;}
.nav-tabs>li,.nav-pills>li{float:left;}
.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
.nav-tabs{border-bottom:1px solid #ddd;}
.nav-tabs>li{margin-bottom:-1px;}
.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;}
.nav-stacked>li{float:none;}
.nav-stacked>li>a{margin-right:0;}
.nav-tabs.nav-stacked{border-bottom:0;}
.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
.nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;}
.nav-tabs .dropdown-toggle .caret{margin-top:8px;}
.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
.nav>.dropdown.active>a:hover{cursor:pointer;}
.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
.tabs-stacked .open>a:hover{border-color:#999999;}
.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
.tabbable:after{clear:both;}
.tab-content{overflow:auto;}
.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
.tab-content>.active,.pill-content>.active{display:block;}
.tabs-below>.nav-tabs{border-top:1px solid #ddd;}
.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd;}
.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
.tabs-left>.nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
.tabs-right>.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
.nav>.disabled>a{color:#999999;}
.nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default;}
/**
* Bootstrap.js by @fat & @mdo
* plugins: bootstrap-tab.js
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery)
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment