Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar module display improvements #11

Merged
merged 4 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ jobs:
with:
fetch-depth: 1

- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 119.0.6045.105

- name: List Chrome
run: apt list --installed | grep chrome

- name: Remove Chrome
run: sudo apt remove google-chrome-stable

- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 119.0.6045.105

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -823,4 +823,4 @@ RUBY VERSION
ruby 3.0.6p216

BUNDLED WITH
2.3.20
2.5.9
1 change: 1 addition & 0 deletions app/packs/src/decidim/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const calendar = new Calendar(calendarEl, {
? parseInt(calendarEl.dataset.firstday)
: 1,
initialDate: getInitialDate(),
contentHeight: "auto",
headerToolbar: {
left: "prev,next today",
center: "title",
Expand Down
4 changes: 3 additions & 1 deletion app/presenters/decidim/calendar/event_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def all_day?
def hour
return nil if start.is_a?(Date) || all_day?

start.strftime("%H:%M")
format = Decidim::Calendar.calendar_options[:hour12] ? "%I:%M %p" : "%H:%M"

start.strftime(format)
end
end
end
Expand Down
Loading
Loading