Skip to content

Commit

Permalink
Merge pull request #54 from dasasha/master
Browse files Browse the repository at this point in the history
user_info and css fixes
  • Loading branch information
filiroman committed May 17, 2012
2 parents e5dc175 + c16525f commit 89944c0
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 52 deletions.
30 changes: 18 additions & 12 deletions punk-shop-yii/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body
height: 100%;
margin: 0 auto;
padding: 0;
color: #555;
color: #2a2d2f;
font: normal 10pt Arial,Helvetica,sans-serif;
background: #EFEFEF;
}
Expand Down Expand Up @@ -78,12 +78,12 @@ body
#categories{
position: relative;
min-height: 50px;
margin:0 !important;
margin:5px !important;
padding:0 !important;
width: 220px;
float: right;
right: 5px;
top: 10px;
right: 0px;
top: 40px;
border-top: 1px solid #adb2b5;
border-left: 1px solid #adb2b5;
border-right: 1px solid #adb2b5;
Expand All @@ -94,7 +94,8 @@ body
font-size:21px;
font-family: calibri;
text-decoration: none;
color: #d85e5e;
color: #4d9ac6;

margin:0 !important;
padding:0 0 0 0 !important;
}
Expand Down Expand Up @@ -122,7 +123,7 @@ body
#result{
position: relative;
margin: 10px 0 0;
padding: 10px 0 0 0;
padding: 10px 2px 0 0;
background-color: white;
min-height: 250px;
width: 520px;
Expand All @@ -133,8 +134,8 @@ body
position: relative;
min-height: 100px;
height: 240px;
width: 510px;
margin: 15px 0;
width: 5120px;
margin: 15px 5px;
border-bottom: 1px solid #adb2b5;
}

Expand Down Expand Up @@ -261,9 +262,14 @@ body
}

#user_img{
position: absolute;
left: 530px;
top: 170px;
float: left;
max-width: 150px;
max-height: 200px;
margin: 0 10px 10px 0;
}
#user_name{
margin: 10px 0 10px 0;
font-size: 24px;
}

table{
Expand Down Expand Up @@ -324,7 +330,7 @@ div.form .rememberMe label
div.view
{
padding: 10px;
margin: 10px 0;
margin: 10px 5px;
border: 1px solid #C9E0ED;
}

Expand Down
2 changes: 1 addition & 1 deletion punk-shop-yii/protected/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'connectionString' => 'mysql:host=localhost;dbname=punk_shop_test',
'emulatePrepare' => true,
'username' => 'root',
'password' => '12345',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'tbl_',

Expand Down
64 changes: 25 additions & 39 deletions punk-shop-yii/protected/modules/user/views/profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
UserModule::t("Профиль"),
);
?><h2><?php echo UserModule::t('Ваш профиль'); ?></h2>
<?php echo $this->renderPartial('menu'); ?>
<div style="position:relative;float:right;right:100px;"><?php echo $this->renderPartial('menu'); ?></div>


<?php $ava = CHtml::encode($model->avatar);
Expand All @@ -20,60 +20,46 @@
<?php echo Yii::app()->user->getFlash('profileMessage'); ?>
</div>
<?php endif; ?>
<table class="dataGrid">
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('username')); ?>
</th>
<td><?php echo CHtml::encode($model->username); ?>
</td>
</tr>

<p id="user_name"><?php echo CHtml::encode($model->username); ?></p>


<?php
$profileFields=ProfileField::model()->forOwner()->sort()->findAll();
if ($profileFields) {
foreach($profileFields as $field) {
//echo "<pre>"; print_r($profile); die();
?>
<tr>
<th class="label"><?php echo CHtml::encode(UserModule::t($field->title)); ?>
</th>
<td><?php echo (($field->widgetView($profile))?$field->widgetView($profile):CHtml::encode((($field->range)?Profile::range($field->range,$profile->getAttribute($field->varname)):$profile->getAttribute($field->varname)))); ?>
</td>
</tr>



<span><?php echo (($field->widgetView($profile))?$field->widgetView($profile):CHtml::encode((($field->range)?Profile::range($field->range,$profile->getAttribute($field->varname)):$profile->getAttribute($field->varname)))); ?></span></br>


<?php
}//$profile->getAttribute($field->varname)
}
?>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('email')); ?>
</th>
<td><?php echo CHtml::encode($model->email); ?>
</td>
</tr>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('createtime')); ?>
</th>
<td><?php echo date("d.m.Y",$model->createtime); ?>
</td>
</tr>
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?>
</th>
<td><?php echo date("d.m.Y",$model->lastvisit); ?>
</td>
</tr>
<p></p>
<p id="user_email"><?php echo CHtml::encode($model->email);?></p>
<p></p>

<span ><?php echo CHtml::encode($model->getAttributeLabel('createtime')); ?></span>
<p><?php echo date("d.m.Y",$model->createtime); ?></p>
<span><?php echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?></span>
<p><?php echo date("d.m.Y",$model->lastvisit); ?></p>

<!--<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('status')); ?>
</th>
<td><?php echo CHtml::encode(User::itemAlias("UserStatus",$model->status));
?>
</td>
</tr>-->
<tr>
<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('about')); ?>
</th>
<td><?php echo CHtml::encode($model->about);

<p><?php echo CHtml::encode($model->getAttributeLabel('about')); ?></p>

<?php echo CHtml::encode($model->about);
//var_dump($model->about);
?>
</td>
</tr>
</table>

4 changes: 4 additions & 0 deletions punk-shop-yii/protected/views/goods/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
<!--<h1>Обновить товар <?php echo $model->id; ?></h1>-->
<h1>Обновить товар - <?php echo $model->title; ?></h1>
<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
<script>
input = document.getElementsByTagName('input');
input[4].size=45;
</script>

0 comments on commit 89944c0

Please sign in to comment.