Skip to content

Commit

Permalink
[NF] Scaffolding and first pass to fix #88
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Apr 4, 2016
1 parent fd699a9 commit 31ee745
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 87 deletions.
62 changes: 31 additions & 31 deletions application/views/customer/overview.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ul class="breadcrumb">
<li>
<h3>
{$cust->getName()}
{$cust->getFormattedName()}
{tmplinclude file='customer/custtype.phtml'}
</h3>
{if $resellerMode && $cust->getReseller()}
Expand All @@ -12,7 +12,7 @@
</li>
<li class="pull-right" style="margin-top: 12px;">
<div class="btn-toolbar" style="display: inline;">

<div class="btn-group">
<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
<i class="icon-cog"></i>
Expand All @@ -21,16 +21,16 @@
<ul class="dropdown-menu pull-right">
<li>
<a href="{genUrl controller='virtual-interface' action="add-wizard" custid=$cust->getId() rtn="ov"}">
Provision new port...
Provision new port...
</a>
</li>
<li class="divider"></li>
<li class="divider"></li>
<li>
<a href="{genUrl controller="customer" action="welcome-email" id=$cust->getId()}">Send Welcome Email...</a>
</li>
</ul>
</div>

<div class="btn-group">
<a class="btn btn-mini dropdown-toggle" href="#" data-toggle="dropdown">
<i class="icon-pencil"></i>
Expand All @@ -53,32 +53,32 @@
</li>
</ul>
</div>

<div class="btn-group">
{assign var=haveprev value=0}
{assign var=havenext value=0}
{foreach from=$customers key=k item=i name=custs}
{if $smarty.foreach.custs.first}
{assign var=cidprev value=$k}
{/if}

{if $k eq $cust->getId()}
{assign var=haveprev value=1}
{elseif $haveprev and not $havenext}
{assign var=havenext value=1}
{assign var=cidnext value=$k}
{/if}

{if not $haveprev}
{assign var=cidprev value=$k}
{/if}

{if not $havenext and $smarty.foreach.custs.last}
{assign var=cidnext value=$k}
{/if}

{/foreach}

<a class="btn btn-mini" href="{genUrl controller='customer' action="overview" id=$cidprev}"><i class="icon-chevron-left"></i></a>
<a class="btn btn-mini" href="{genUrl controller='customer' action="overview" id=$cust->getId()}"><i class="icon-refresh"></i></a>
<a class="btn btn-mini" href="{genUrl controller='customer' action="overview" id=$cidnext}"><i class="icon-chevron-right"></i></a>
Expand All @@ -93,9 +93,9 @@
<div class="row-fluid">

<div class="span12 tabbable">

<ul id="customer-overview-tabs" class="nav nav-tabs">

<li class="active">
<a href="#overview" data-toggle="tab">Overview</a>
</li>
Expand All @@ -115,7 +115,7 @@
<a href="#resold-customers" data-toggle="tab">Resold Customers</a>
</li>
{/if}

{if $cust->getType() neq CUSTOMER::TYPE_ASSOCIATE and ( not $cust->hasLeft() )}
<li>
<a href="#ports" data-toggle="tab">Ports</a>
Expand All @@ -127,35 +127,35 @@
</li>
{/if}
{/if}

<li>
<a href="#users" data-toggle="tab">Users</a>
</li>

<li>
<a href="#contacts" data-toggle="tab">Contacts</a>
</li>

<li>
<a href="#logins" data-toggle="tab">Logins</a>
</li>

<li>
<a href="#notes" id="tab-notes" data-toggle="tab">
Notes {if isset( $unreadNotes ) and $unreadNotes}
<span id="notes-unread-indicator" class="badge badge-success">{$unreadNotes}</span>
{/if}
</a>
</li>

{if count( $cust->getConsoleServerConnections() )}
<li>
<a href="#console-server-connections" data-toggle="tab">OOB Access</a>
</li>
{/if}

{if $cust->getType() neq CUSTOMER::TYPE_ASSOCIATE and ( not $cust->hasLeft() )}

{if not isset( $options['frontend']['disabled']['rs-prefixes'] ) or not $options['frontend']['disabled']['rs-prefixes'] }
{if $cust->isRouteServerClient()}
<li>
Expand All @@ -176,9 +176,9 @@
</li>
{/if}
{/if}

</ul>

<div class="tab-content">
<div class="tab-pane active" id="overview">
{tmplinclude file="customer/overview-tabs/overview.phtml"}
Expand Down Expand Up @@ -215,33 +215,33 @@
</div>
{/if}
{/if}

<div class="tab-pane" id="users">
{tmplinclude file="customer/overview-tabs/users.phtml"}
</div>

<div class="tab-pane" id="contacts">
{tmplinclude file="customer/overview-tabs/contacts.phtml"}
</div>

<div class="tab-pane" id="logins">
{tmplinclude file="customer/overview-tabs/logins.phtml"}
</div>

<div class="tab-pane" id="notes">
{tmplinclude file="customer/overview-tabs/notes.phtml"}
</div>

{if count( $cust->getConsoleServerConnections() )}
<div class="tab-pane" id="console-server-connections">
{tmplinclude file="customer/overview-tabs/console-server-connections.phtml"}
</div>
{/if}

</div>

</div>

</div>

<script>{tmplinclude file="customer/js/overview.js"}</script>
Expand Down
28 changes: 14 additions & 14 deletions application/views/statistics/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{if $multiIXP}
{include file='statistics/snippets/menu-ixp-dropdown.phtml'}
{/if}

{include file='statistics/snippets/menu-infra-dropdown.phtml'}
</div>
</li>
Expand All @@ -32,30 +32,30 @@
<div class="span3">

<ul>

{foreach $custs as $cust}

{if count( $custs ) > 12 and $count >= count( $custs )/4}

</ul>
</div>
<div class="span3">
{assign var='count' value=0}
{/if}

<li>
<a href="{genUrl controller="statistics" action="member" shortname=$cust->getShortname()}">
{$cust->getName()}
</a>
</li>

{assign var='count' value=$count+1}

{/foreach}
<li>
<a href="{genUrl controller="statistics" action="member" shortname=$cust->getShortname()}">
{$cust->getFormattedName()}
</a>
</li>

{assign var='count' value=$count+1}

{/foreach}

</ul>
</ul>

</div>
</div>
</div>

{tmplinclude file="footer.phtml"}
2 changes: 1 addition & 1 deletion application/views/statistics/member-drilldown-mini.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>

<center>
<h3>IXP Interface Statistics :: {$cust->getName()} :: {foreach from=$categories key=cname item=cvalue}{if $category eq $cvalue}{$cname}{/if}{/foreach}</h3>
<h3>IXP Interface Statistics :: {$cust->getFormattedName()} :: {foreach from=$categories key=cname item=cvalue}{if $category eq $cvalue}{$cname}{/if}{/foreach}</h3>

{foreach from=$periods key=pname item=pvalue}

Expand Down
4 changes: 2 additions & 2 deletions application/views/statistics/member-drilldown.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="{genUrl controller='customer' action='list'}">Customers</a> <span class="divider">/</span>
</li>
<li>
<a href="{genUrl controller='customer' action='overview' id=$cust->getId()}">{$cust->getName()}</a> <span class="divider">/</span>
<a href="{genUrl controller='customer' action='overview' id=$cust->getId()}">{$cust->getFormattedName()}</a> <span class="divider">/</span>
</li>
<li class="active">
Statistics
Expand All @@ -26,7 +26,7 @@
{if $multiIXP}
@ {$ixp->getShortname()}
{else}
:: {$cust->getName()}
:: {$cust->getFormattedName()}
{/if}

({foreach from=$categories key=cname item=cvalue}{if $category eq $cvalue}{$cname}{/if}{/foreach})
Expand Down
4 changes: 2 additions & 2 deletions application/views/statistics/member.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="{genUrl controller='customer' action='list'}">Customers</a> <span class="divider">/</span>
</li>
<li>
<a href="{genUrl controller='customer' action='overview' id=$cust->getId()}">{$cust->getName()}</a> <span class="divider">/</span>
<a href="{genUrl controller='customer' action='overview' id=$cust->getId()}">{$cust->getFormattedName()}</a> <span class="divider">/</span>
</li>
<li class="active">
Statistics
Expand All @@ -32,7 +32,7 @@
{if $multiIXP}
@ {$ixp->getShortname()}
{else}
:: {$cust->getName()}
:: {$cust->getFormattedName()}
{/if}
</h1>
</div>
Expand Down
Loading

0 comments on commit 31ee745

Please sign in to comment.