]> git.mxchange.org Git - friendica.git/commitdiff
link events + personal notes to profile tabs
authorFriendika <info@friendika.com>
Tue, 14 Jun 2011 03:32:30 +0000 (20:32 -0700)
committerFriendika <info@friendika.com>
Tue, 14 Jun 2011 03:32:30 +0000 (20:32 -0700)
images/icons.png
include/nav.php
mod/apps.php
mod/events.php
mod/notes.php
mod/profile.php
view/profile_tabs.tpl
view/theme/duepuntozero/style.css
view/theme/loozah/style.css

index 9bf6cf6277b92d85afc46ac34f5ce408d297372f..4c4c00b8a5e2065d3c88408157b526bcdff06402 100644 (file)
Binary files a/images/icons.png and b/images/icons.png differ
index 66fdbc49b2688f1e0e63d44aa256c143028b3297..97cbe87cb0aa7ebefa3d08c997ba23f48cb5ccca 100644 (file)
@@ -64,8 +64,8 @@ function nav(&$a) {
                $nav['help'] = array($help_url, t('Help'), "");
 
 
-
-       $nav['apps'] = array('apps', t('Apps'), "");
+       if(count($a->apps))
+               $nav['apps'] = array('apps', t('Apps'), "");
 
        $nav['search'] = array('search', t('Search'), "");
 
index f25722df785ac6942353c74579ba5fc14a967cce..7a0a3f59ea1d62636a28bd7eb0bc90ac855c700c 100644 (file)
@@ -5,19 +5,9 @@ function apps_content(&$a) {
 
        $o .= '<h3>' . t('Applications') . '</h3>';
 
-       $apps = false;
-
-       if(local_user()) {
-               $apps = true;
-               $o .= '<div class="app-title"><a href="notes">' . t('Private Notes') . '</a></div>';
-       }
-
-       if($a->apps) {
-               $apps = true;
+       if($a->apps)
                $o .= $a->apps;
-       }
-
-       if(! $apps)
+       else
                notice( t('No installed applications.') . EOL);
 
        return $o;
index a4809607c800793eba0fa338a51bd7f75c31b59c..1418a754955d252d81bb88f2e3d3a2ecea14b526 100644 (file)
@@ -130,6 +130,14 @@ function events_content(&$a) {
                if(! $m)
                        $m = intval($thismonth);
 
+               // Put some limits on dates. The PHP date functions don't seem to do so well before 1900.
+               // An upper limit was chosen to keep search engines from exploring links endlessly. 
+
+               if($y < 1901)
+                       $y = 1900;
+               if($y > 2099)
+                       $y = 2100;
+
                $nextyear = $y;
                $nextmonth = $m + 1;
                if($nextmonth > 12) {
@@ -144,11 +152,18 @@ function events_content(&$a) {
                        $prevmonth = 12;
                        $prevyear --;
                }
+
                        
                $o .= '<div id="new-event-link"><a href="' . $a->get_baseurl() . '/events/new' . '" >' . t('Create New Event') . '</a></div>';
-               $o .= '<a href="' . $a->get_baseurl() . '/events/' . $prevyear . '/' . $prevmonth . '" class="prevcal">' . t('&lt;&lt; Previous') . '</a> | <a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal">' . t('Next &gt;&gt;') . '</a>'; 
+               $o .= '<div id="event-calendar-wrapper">';
+
+               $o .= '<a href="' . $a->get_baseurl() . '/events/' . $prevyear . '/' . $prevmonth . '" class="prevcal"><div id="event-calendar-prev" class="icon prev" title="' . t('Previous') . '"></div></a>';
                $o .= cal($y,$m,false, ' eventcal');
 
+               $o .= '<a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal"><div id="event-calendar-next" class="icon next" title="' . t('Next') . '"></div></a>';
+               $o .= '</div>';
+               $o .= '<div class="event-calendar-end"></div>';
+
                $dim    = get_dim($y,$m);
                $start  = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
                $finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
index 7a826bf61224413f61f436525d281a262bb0e254..0f980ff67fda92a0dd27cbc32bb5ba0368239850 100644 (file)
@@ -38,7 +38,7 @@ function notes_content(&$a) {
        $is_owner = true;
        
 
-       $o .= '<h3>' . t('Private Notes') . '</h3>';
+       $o .= '<h3>' . t('Personal Notes') . '</h3>';
 
        $commpage = false;
        $commvisitor = false;
index 7dfdb49de4e103d6f881cdf2d909ce3f62e6a3c3..aeb21f077c38ab2b0397a4e777a11b62fcaccdd4 100644 (file)
@@ -115,7 +115,9 @@ function profile_content(&$a, $update = 0) {
                        '$phototab' => $a->get_baseurl() . '/photos/' . $a->profile['nickname'],
                        '$status' => t('Status'),
                        '$profile' => t('Profile'),
-                       '$photos' => t('Photos')
+                       '$photos' => t('Photos'),
+                       '$events' => (($is_owner) ?     '<a href="events" id="profile-tab-events-link" class="profile-tabs" >' . t('Events') . '</a>' : ''),
+                       '$notes' => (($is_owner) ?      '<a href="notes" id="profile-tab-notes-link" class="profile-tabs" >' . t('Personal Notes') . '</a>' : '')
                ));
 
 
index 975d069a682a343491c5cc73542d421c02cec130..3628ff5ff0316aa613d600f2463c6b122a4600ab 100644 (file)
@@ -3,5 +3,7 @@
        <a href="$url" id="profile-tab-status-link" class="profile-tabs" >$status</a>
        <a href="$url?tab=profile" id="profile-tab-profile-link" class="profile-tabs" >$profile</a>
        <a href="$phototab" id="profile-tab-photos-link" class="profile-tabs" >$photos</a>
+       $events
+       $notes
 <div id="profile-tabs-end"></div>
 </div>
\ No newline at end of file
index 8928148042291edf4787b99e24d9b490d42bce52..9555a1e964ec77e0ac924f3636ebc122f40cb42d 100644 (file)
@@ -2224,7 +2224,8 @@ a.mail-list-link {
 }
 
 .eventcal {
-       font-size: 24px;
+       float: left;
+       font-size: 20px;
 }
 
 #new-event-link {
@@ -2245,6 +2246,17 @@ a.mail-list-link {
 .event-start .dtstart, .event-end .dtend {
        float: right;
 }
+
+.prevcal, .nextcal {
+       float: left;
+       margin-left: 32px;
+       margin-right: 32px;
+       margin-top: 64px;
+}
+.event-calendar-end {
+       clear: both;
+}
+
  
 .calendar {
        font-family: Courier, monospace;
@@ -2454,6 +2466,8 @@ a.mail-list-link {
 }
 
 
+
+
 #lang-select-icon {
        cursor: pointer;
        position: absolute;
@@ -2505,6 +2519,8 @@ a.mail-list-link {
 .youtube { background-position: -64px -32px;}
 .attach { background-position: -80px -32px; }
 .language { background-position: -96px -32px; }
+.prev { background-position: -112px -32px; }
+.next { background-position: -128px -32px; }
 
 
 .attachtype {
index 0edde248e3451b6a3cd429b965d29401383a2bc6..a566acadcb5acf0cc652a0fad29613ca99fc1157 100644 (file)
@@ -2423,6 +2423,48 @@ a.mail-list-link {
        color: #FF0000;
 }
 
+.eventcal {
+       float: left;
+       font-size: 20px;
+}
+
+#new-event-link {
+       margin-bottom: 10px;
+}
+
+.event-description:before {
+       content: url('../../../images/calendar.png');
+       margin-right: 15px;
+}
+
+.event-start, .event-end {
+       margin-left: 10px;
+       width: 330px;
+       clear: both;
+}
+
+.event-start .dtstart, .event-end .dtend {
+       float: right;
+}
+
+.prevcal, .nextcal {
+       float: left;
+       margin-left: 32px;
+       margin-right: 32px;
+       margin-top: 64px;
+}
+.event-calendar-end {
+       clear: both;
+}
+.calendar {
+       font-family: Courier, monospace;
+}
+.today {
+       color: #FF0000;
+}
+
+
 #event-start-text, #event-finish-text {
        margin-top: 10px;
        margin-bottom: 5px;
@@ -2491,6 +2533,8 @@ a.mail-list-link {
 .youtube { background-position: -64px -32px;}
 .attach { background-position: -80px -32px; }
 .language { background-position: -96px -32px; }
+.prev { background-position: -112px -32px; }
+.next { background-position: -128px -32px; }
 
 .attachtype {
        display: block; width: 20px; height: 23px;