Skip to content

Commit

Permalink
Merge branch 'develop' of ssh://git@github.com/exponentcms/exponent-c…
Browse files Browse the repository at this point in the history
…ms into develop
  • Loading branch information
freddirkse committed Jun 23, 2011
2 parents c74a71c + 3991078 commit 979d6c1
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 136 deletions.
13 changes: 9 additions & 4 deletions framework/core/assets/css/tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,26 @@ table.exp-skin-table {
padding:0.25em 0.5em;
text-align:left;
vertical-align:top;
}
}
.exp-skin-table tbody th {
font-weight:normal;
white-space:nowrap;
}
}
.exp-skin-table tbody td,
.exp-skin-table tbody th {
border:1px solid #fff;
border-width:1px 0;
}
}
.exp-skin-table tbody tr.odd th,
.exp-skin-table tbody tr.odd td {
border-color:#EBE5D9;
background:#F7F4EE;
}
}
.exp-skin-table tbody tr.even th,
.exp-skin-table tbody tr.even td {
border-color:#EBE5D9;
background:#cdcbc6;
}
.exp-skin-table tbody tr:hover td,
.exp-skin-table tbody tr:hover th {
background:#d5e3f3;
Expand Down
3 changes: 3 additions & 0 deletions framework/core/database/definitions/addresses.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
'address2'=>array(
DB_FIELD_TYPE=>DB_DEF_STRING,
DB_FIELD_LEN=>150),
'address_type'=>array(
DB_FIELD_TYPE=>DB_DEF_STRING,
DB_FIELD_LEN=>150),
'city'=>array(
DB_FIELD_TYPE=>DB_DEF_STRING,
DB_FIELD_LEN=>100),
Expand Down
4 changes: 2 additions & 2 deletions framework/modules/addressbook/views/address/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ YUI(EXPONENT.YUI3_CONFIG).use('node', function(Y) {
<p>
<em>Fields marked with an * are required.</em>
</p>
{*eDebug var=$record*}

{form action=update}
{control type=hidden name=id value=$record->id}
Expand All @@ -59,7 +58,7 @@ YUI(EXPONENT.YUI3_CONFIG).use('node', function(Y) {

{if $user->is_admin || $user->is_acting_admin}
{control type=state name=state label="<span class=\"required\">*</span>State/Province" includeblank="-- Choose a State -- " all_us_territories=true exclude="6,8,10,17,30,46,50" value=$record->state add_other=true}
{control type=text name=non_us_state label="&nbsp;State/Province" value=$record->non_us_state}
{*control type=text name=non_us_state label="&nbsp;State/Province" value=$record->non_us_state*}
{control type=country name=country label="&nbsp;Country" value=$record->country|default:223}
{else}
{control type=state name=state label="<span class=\"required\">*</span>State" includeblank="-- Choose a State -- " value=$record->state}
Expand All @@ -69,6 +68,7 @@ YUI(EXPONENT.YUI3_CONFIG).use('node', function(Y) {

{control type=text name=zip label="<span class=\"required\">*</span>Zip/Postal Code" value=$record->zip}
{control type="text" name="phone" label="<span class=\"required\">*</span>Phone Number <span class=\"example\">ex: 480-555-4200</span>" value=$record->phone}
{control type="dropdown" name="address_type" label="Address Type"|gettext items="Business,Residential" default=$record->address_type|default:"Residential"}
{control type="text" name="email" label="<span class=\"required\">*</span>Email Address" value=$record->email}
{if !$user->isLoggedIn()}

Expand Down
119 changes: 56 additions & 63 deletions framework/modules/addressbook/views/address/manage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,65 @@
* GPL: http://www.gnu.org/licenses/gpl.txt
*
*}

{css unique="myID" corecss="tables"}
{literal}
.control label.label {
display:inline-block;
*display:inline;
zoom:1;
vertical-align:top;
margin-right:10px
}
{/literal}
{/css}

<div id="storeconfig" class="module ecomconfig configure hide exp-skin-tabview">
<h1>Address Configuration</h1>
{script unique="storeconf" yuimodules="tabview, element"}
{literal}
var tabView = new YAHOO.widget.TabView('storetabs');

var url = location.href.split('#');
if (url[1]) {
//We have a hash
var tabHash = url[1];
var tabs = tabView.get('tabs');
for (var i = 0; i < tabs.length; i++) {
if (tabs[i].get('href') == '#' + tabHash) {
tabView.set('activeIndex', i);
break;
}
}
}

YAHOO.util.Dom.removeClass("storeconfig", 'hide');
var loading = YAHOO.util.Dom.getElementsByClassName('loadingdiv', 'div');
YAHOO.util.Dom.setStyle(loading, 'display', 'none');
{/literal}
{/script}
<div id="storeconfig" class="module address manage">
<h1>{"Geography Settings"|gettext}</h1>

{form action=manage_update}
<div id="storetabs" class="yui-navset">
<ul class="yui-nav">
<li class="selected"><a href="#tab1"><em>Allowed Geographies</em></a></li>
</ul>
<div class="yui-content">
<div id="tab1">
<h2>Geography Settings</h2>
Select the Countries and States/Provinces below that you would like to show for users creating billing and shipping addresses:
<table style="margin-left: 25px;">
{foreach from=$countries item=country}
<tr>
<td colspan="2">{control type="checkbox" name="country[`$country->id`]" label=`$country->name` value=1 checked=$country->active}
</td>
<td>{control type="radio" name="country_default" label="Default Country?" value=$country->id checked=$country->is_default}</td>
</tr>
<div></div>
{foreach from=$regions item=region}
{if $region->country_id == $country->id}

<tr>
<td>&nbsp;</td>
<td>{control type="checkbox" name="region[`$region->id`]" label=`$region->name` value=1 checked=$region->active}</td>
<td>{control type="text" name="region_rank[`$region->id`]" label="Rank:" size="5" value=$region->rank}</td>
</tr>
<!-- div>
<div style="margin-left: 25px; width:49%;">{control type="checkbox" name="address_state[`$region->id`]" label=`$region->name` value=1 checked=$config.address_allow_admins_all}</div>
<div style="float: right; width:49%;">{control type="text" name="address_state_rank[x]" label=" " size="10" value=$config.invoice_subject}</div>
<div style="clear:both;"></div>
</div -->
{/if}
{foreachelse}
No defined regions in this country.
{/foreach}
{/foreach}
</table>
</div>
</div>
</div>
Select the Countries and States/Provinces below that you would like to show for users creating billing and shipping addresses:
<table class="exp-skin-table">
<thead>
<tr>
<th>
{"Country"|gettext}
</th>
<th>
{"State"|gettext}
</th>
<th>
{"Default / Rank"|gettext}
</th>
</tr>
</thead>
<tbody>
{foreach from=$countries item=country}
<tr class="{cycle values="odd,even"}">
<td colspan="2">{control type="checkbox" name="country[`$country->id`]" label=`$country->name` value=1 checked=$country->active}
</td>
<td>{control type="radio" name="country_default" label="Default Country?" value=$country->id checked=$country->is_default}</td>
</tr>
{foreach from=$regions item=region}
{if $region->country_id == $country->id}

<tr class="{cycle values="odd,even"}">
<td>&nbsp;</td>
<td>{control type="checkbox" name="region[`$region->id`]" label=`$region->name` value=1 checked=$region->active}</td>
<td>{control type="text" name="region_rank[`$region->id`]" label="Rank:" size="5" value=$region->rank}</td>
</tr>
<!-- div>
<div style="margin-left: 25px; width:49%;">{control type="checkbox" name="address_state[`$region->id`]" label=`$region->name` value=1 checked=$config.address_allow_admins_all}</div>
<div style="float: right; width:49%;">{control type="text" name="address_state_rank[x]" label=" " size="10" value=$config.invoice_subject}</div>
<div style="clear:both;"></div>
</div -->
{/if}
{foreachelse}
No defined regions in this country.
{/foreach}
{/foreach}
</tbody>
</table>
{control type=buttongroup submit="Save Address Configuration" cancel="Cancel"}
{/form}
</div>
<div class="loadingdiv">Loading</div>
43 changes: 21 additions & 22 deletions framework/modules/addressbook/views/address/myaddressbook.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,27 @@
{/if}
</td>
<td>
<address class="address show">

<strong>{$address->firstname} {$address->middlename} {$address->lastname}</strong>{br}
{$address->address1}{br}
{if $address->address2 != ""}{$address->address2}{br}{/if}
{$address->city}, {if $address->state == -2}{$address->non_us_state}{else}{$address->state|statename}{/if} {$address->zip}{br}
{if $address->state == -2}{$address->country|countryname}{br}{/if}
{$address->phone}{br}
{$address->email}{br}
{clear}
</address>
</td>
<td>
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
<div class="item-actions">
{if $user->id == $address->user_id}
{icon action=edit record=$address title="Edit this Address"}
{if $addresses|@count > 1}{icon action=delete record=$address title="Delete this Address" onclick="return confirm('Are you sure you want to delete this address?');"}{/if}
{/if}
</div>
{/permissions}
</td>
<address class="address show">
<strong>{$address->firstname} {$address->middlename} {$address->lastname}</strong>{br}
{$address->address1}{br}
{if $address->address2 != ""}{$address->address2}{br}{/if}
{$address->city}, {if $address->state == -2}{$address->non_us_state}{else}{$address->state|statename}{/if} {$address->zip}{br}
{if $address->state == -2}{$address->country|countryname}{br}{/if}
{$address->address_type}{br}
{$address->phone}{br}
{$address->email}{br}
</address>
</td>
<td>
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
<div class="item-actions">
{if $user->id == $address->user_id}
{icon action=edit record=$address title="Edit this Address"}
{if $addresses|@count > 1}{icon action=delete record=$address title="Delete this Address" onclick="return confirm('Are you sure you want to delete this address?');"}{/if}
{/if}
</div>
{/permissions}
</td>
</tr>
{foreachelse}
<tr><td colspan="4"></tr><p>You don't have any addresses in your address book yet</p></td>
Expand Down
17 changes: 12 additions & 5 deletions framework/modules/addressbook/views/address/show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
*}

<address class="address show">
{$address->firstname} {$address->middlename} {$address->lastname}{br}
{$address->address1}
{if $address->address2 != ""}, {$address->address2}{br}{else}{br}{/if}
<span class="fullname">
{$address->firstname} {$address->middlename} {$address->lastname}
</span>
{if $address->organization}<span class="company">{$address->organization}</span>{/if}
<span class="address1">{$address->address1}</span>
{if $address->address2 != ""}<span class="address2">{$address->address2}</span>{/if}
<span class="citystatzip">
{$address->city},
{if $address->state == -2}
{$address->non_us_state}
Expand All @@ -26,7 +30,10 @@
{/if}
{$address->zip}{br}
{if $address->state == -2}
{$address->country|countryname}{br}
{$address->country|countryname}
{/if}
{$address->phone}
</span>
{if $address->address_type}<span class="address_type">{$address->address_type}</span>{/if}
<span class="phone">{$address->phone}</span>
<span class="email">{$address->email}</span>
</address>
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class administrationController extends expController {
public $basemodel_name = 'expRecord';
public $useractions = array();
public $add_permissions = array('administrate'=>'Manage Administration','toggle_minify'=>'Configure Website Settings',"switch_themes"=>"change themes");
public $add_permissions = array('administrate'=>'Manage Administration','toggle_minify'=>'Configure Website Settings',"switch_themes"=>"change themes","install_tables"=>"Install Tables");
public $codequality = 'beta';

function name() { return $this->displayname(); } //for backwards compat with old modules
function displayname() { return "Administration Controls"; }
function description() { return "This is the beginnings of the new Administration Module"; }
function author() { return "Adam Kessler - OIC Group, Inc"; }
function author() { return "OIC Group, Inc"; }
function hasSources() { return true; }
function hasViews() { return true; }
function hasContent() { return true; }
Expand Down Expand Up @@ -115,6 +115,7 @@ public function install_tables() {
}
}
ksort($tables);
exponent_sessions_clearCurrentUserSessionCache();
assign_to_template(array('status'=>$tables));
}

Expand Down
6 changes: 6 additions & 0 deletions framework/modules/ecommerce/assets/css/cart.css
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ table#cart table td {
}


#shpAddSwp address span,
#bllAddSwp address span {
display:block;
}


#shoppingcartwrapper {
overflow:hidden;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function __construct($src=null,$params=array()) {
expSession::set('catid',$default_id);
}
} elseif (isset($this->config['show_first_category']) || (!expTheme::inAction() && $section==SITE_DEFAULT_SECTION)) {
$default_id = $db->selectValue('storeCategories', 'id', 'lft=0');
$default_id = $db->selectValue('storeCategories', 'id', 'lft=1');
expSession::set('catid',$default_id);
} elseif (!isset($this->config['show_first_category']) && !expTheme::inAction()) {
expSession::set('catid',0);
Expand Down
37 changes: 2 additions & 35 deletions framework/modules/ecommerce/views/order/invoice.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,7 @@
<tbody>
<tr>
<td style="width:27%;">
<address>
<span class="fullname">{$order->billingmethod[0]->firstname} {if $order->billingmethod[0]->middlename !=''}{$order->billingmethod[0]->middlename} {/if}{$order->billingmethod[0]->lastname}</span>
{if $order->billingmethod[0]->organization != ""}<span class="company">{$order->billingmethod[0]->organization}</span>{/if}
{if $order->billingmethod[0]->address1 != ""}<span class="address1">{$order->billingmethod[0]->address1}</span>{/if}
{if $order->billingmethod[0]->address2 != ""}<span class="address2">{$order->billingmethod[0]->address2}</span>{/if}
<span class="citystatzip">{$order->billingmethod[0]->city},&nbsp;
{if $order->billingmethod[0]->state == -2}
{$order->billingmethod[0]->non_us_state}
{elseif $order->billingmethod[0]->state != ""}
{$order->billingmethod[0]->state|statename:abbv}
{/if} {$order->billingmethod[0]->zip}
{if $order->billingmethod[0]->state == -2}
{br}{$order->billingmethod[0]->country|countryname}
{/if}
</span>
{if $order->billingmethod[0]->phone != ""}<span class="phone">{$order->billingmethod[0]->phone}</span>{/if}
{if $order->billingmethod[0]->email != ""}<span class="email">{$order->billingmethod[0]->email}</span>{/if}
</address>
{$order->billingmethod[0]->addresses_id|address}
{permissions}
<div class="item-permissions">
{if $permissions.edit_address == 1 && !$pf}
Expand All @@ -117,23 +100,7 @@
{/permissions}
</td>
<td style="width:27%;">
<address>
<span class="fullname">{$shipping->shippingmethod->firstname} {if $shipping->shippingmethod->middlename !=''}{$shipping->shippingmethod->middlename} {/if}{$shipping->shippingmethod->lastname}</span>
{if $shipping->shippingmethod->organization != ""}<span class="company">{$shipping->shippingmethod->organization}</span>{/if}
{if $shipping->shippingmethod->address1 != ""}<span class="address1">{$shipping->shippingmethod->address1}</span>{/if}
{if $shipping->shippingmethod->address2 != ""}<span class="address2">{$shipping->shippingmethod->address2}</span>{/if}
<span class="citystatzip">{$shipping->shippingmethod->city},&nbsp;
{if $shipping->shippingmethod->state == -2}
{$shipping->shippingmethod->non_us_state}
{elseif $shipping->shippingmethod->state != ""}
{$shipping->shippingmethod->state|statename:abbv}
{/if} {$shipping->shippingmethod->zip}
{if $shipping->shippingmethod->state == -2}
{br}{$shipping->shippingmethod->country|countryname}
{/if}</span>
{if $shipping->shippingmethod->phone != ""}<span class="phone">{$shipping->shippingmethod->phone}</span>{/if}
{if $shipping->shippingmethod->email != ""}<span class="email">{$shipping->shippingmethod->email}</span>{/if}
</address>
{$shipping->shippingmethod->addresses_id|address}
{permissions}
<div class="item-permissions">
{if $permissions.edit_address == 1 && !$pf}
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/ecommerce/views/store/showTopLevel.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
*}

<div class="module store showall-toplevel">
<div class="module store show-top-level">
{assign var=depth value=0}
<h1>{$moduletitle|default:""}</h1>
<div id="catnav">
Expand Down
3 changes: 2 additions & 1 deletion subsystems/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function exponent_config_parse($configname,$site_root = null) {
function exponent_config_parseFile($file) {
$options = array();
foreach (file($file) as $line) {
$line = trim(preg_replace(array("/^.*define\([\"']/","/[^&][#].*$/"),"",$line));
//$line = trim(preg_replace(array("/^.*define\([\"']/","/[^&][#].*$/"),"",$line));
$line = trim(preg_replace(array("/^.*define\([\"']/","/[^&][#][@].*$/"),"",$line));
if ($line != "" && substr($line,0,2) != "<?" && substr($line,-2,2) != "?>") {
$line = str_replace(array("<?php","?>","<?",),"",$line);

Expand Down

0 comments on commit 979d6c1

Please sign in to comment.