Skip to content

Commit

Permalink
added multiple events icon to calendar, and reorder CSS afer merge
Browse files Browse the repository at this point in the history
  • Loading branch information
robdayz committed Jul 11, 2018
1 parent ef70eb3 commit c06013b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
28 changes: 21 additions & 7 deletions genweb/organs/browser/stylesheets/genweb_organs.css
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,6 @@ dd.actionMenuContent.actionMenuContentColor {
}



@media only screen and (max-width: 639px) {
.header-image {
height:40px !important;
Expand All @@ -1744,16 +1743,16 @@ dd.actionMenuContent.actionMenuContentColor {

}

div.header-image.nomarginleft {
margin-left: 0px !important;
}

@media only screen and (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
.header-image {
background-size: auto !important;
background-image: url("++resource++genweb.organs.stylesheets/capcalera_organs@2x.jpg") !important;
background-image: url("++resource++genweb.organs.stylesheets/capcalera_organs@2x.jpg") !important;}
}
input.searchPage {width: 70%;}



div.header-image.nomarginleft {
margin-left: 0px !important;
}

ul.latests-acords {
Expand Down Expand Up @@ -1914,3 +1913,18 @@ td.organevent.cal_has_events .popover-content a {
opacity: 1;
transition: all .5s ease;
}

.event-multiple {
position: relative;
}

.event-multiple:before {
content: "+";
color: #ffffff;
font-size: 11px;
font-weight: 600;
position: absolute;
bottom: -3px;
right: 3px;
}

6 changes: 4 additions & 2 deletions genweb/organs/portlets/portlet_calendar.pt
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@
next_month day/next_month;
prev_month day/prev_month;
events day/events;
classtag python:view.getclasstag_event(day);
limit python:len(events) if events is not None else 0"
tal:attributes="class python:u'ulearnevent%s%s%s%s' %
tal:attributes="class python:u'ulearnevent%s%s%s%s%s' %
((today and ' today' or ''),
(next_month and ' cal_next_month' or ''),
(prev_month and ' cal_prev_month' or ''),
(events and ' cal_has_events' or ''));
(events and ' cal_has_events' or ''),
(classtag or ''));
style string:background-color:${day/color}">
<a href=""
rel="popover" data-placement="bottom" data-html="True"
Expand Down
10 changes: 10 additions & 0 deletions genweb/organs/portlets/portlet_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ def get_next_month(self, year, month):
def date_events_url(self, date):
return '%s?mode=day&date=%s' % (self.calendar_url, date)

def getclasstag_event(self, day):
# Returns class color to show in the calendar
classtag = ''

if day['events']:
# if len(day['events']) > 1:
if len(day['events']) > 1:
classtag += ' event-multiple '
return classtag

@property
def cal_data(self):
"""Calendar iterator over weeks and days of the month to display.
Expand Down

0 comments on commit c06013b

Please sign in to comment.