aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 21:00:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 21:00:53 +0000
commit97530e4d5aa108e8cd0531d53f1f30c909f016e2 (patch)
tree84ee03eb50a61edca57cc0089199ec7856ee0537 /mod/profile/views
parent4abf61c5a7447f1f7ad16eb3decee1969396fd58 (diff)
downloadelgg-97530e4d5aa108e8cd0531d53f1f30c909f016e2.tar.gz
elgg-97530e4d5aa108e8cd0531d53f1f30c909f016e2.tar.bz2
moved profile fields language strings into core and update profile plugin details view
git-svn-id: http://code.elgg.org/elgg/trunk@7729 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views')
-rw-r--r--mod/profile/views/default/profile/css.php7
-rw-r--r--mod/profile/views/default/profile/details.php44
2 files changed, 27 insertions, 24 deletions
diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php
index f280db565..b2a3ff935 100644
--- a/mod/profile/views/default/profile/css.php
+++ b/mod/profile/views/default/profile/css.php
@@ -87,18 +87,17 @@
margin:0 0 7px 0;
padding:2px 4px 2px 4px;
}
-#profile-details .aboutme_title {
+.profile-aboutme-title {
background-color:#f4f4f4;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
margin:0 0 0px 0;
padding:2px 4px 2px 4px;
}
-#profile-details .aboutme_contents {
+.profile-aboutme-contents {
padding:2px 0 0 3px;
}
-/* banned user full profile panel */
-#profile_content .banned_user {
+.profile-banned-user {
border:2px solid red;
padding:4px 8px;
-webkit-border-radius: 6px;
diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php
index b81db30fd..0afceec0b 100644
--- a/mod/profile/views/default/profile/details.php
+++ b/mod/profile/views/default/profile/details.php
@@ -6,41 +6,45 @@
$user = elgg_get_page_owner();
+$profile_fields = elgg_get_config('profile');
+
echo '<div id="profile-details" class="elgg-body pll">';
echo "<h2>{$user->name}</h2>";
$even_odd = null;
-if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) {
- foreach($vars['config']->profile as $shortname => $valtype) {
- if ($shortname != "description") {
- $value = $user->$shortname;
- if (!empty($value)) {
- //This function controls the alternating class
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- ?>
- <p class="<?php echo $even_odd; ?>">
- <b><?php
- echo elgg_echo("profile:{$shortname}");
- ?>: </b>
+if (is_array($profile_fields) && sizeof($profile_fields) > 0) {
+ foreach ($profile_fields as $shortname => $valtype) {
+ if ($shortname == "description") {
+ // skip about me and put at bottom
+ continue;
+ }
+ $value = $user->$shortname;
+ if (!empty($value)) {
+ //This function controls the alternating class
+ $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ ?>
+ <p class="<?php echo $even_odd; ?>">
+ <b><?php echo elgg_echo("profile:{$shortname}"); ?>: </b>
<?php
echo elgg_view("output/{$valtype}", array('value' => $user->$shortname));
?>
- </p>
- <?php
- }
+ </p>
+ <?php
}
}
}
if (!get_plugin_setting('user_defined_fields', 'profile')) {
if ($user->isBanned()) {
- echo "<div class='banned_user'>";
+ echo "<p class='profile-banned-user'>";
echo elgg_echo('banned');
- echo "</div>";
+ echo "</p>";
} else {
- if ($vars['entity']->description) {
- echo "<p class='aboutme_title'><b>" . elgg_echo("profile:aboutme") . "</b></p>";
- echo "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>";
+ if ($user->description) {
+ echo "<p class='profile-aboutme-title'><b>" . elgg_echo("profile:aboutme") . "</b></p>";
+ echo "<div class='profile-aboutme-contents'>";
+ echo elgg_view('output/longtext', array('value' => $user->description));
+ echo "</div>";
}
}
}