Commit graph

68 commits

Author SHA1 Message Date
Andy Allan
0195dd60a4 Simplify date display by using friendly_date helpers 2023-11-15 19:46:10 +00:00
Anton Khorev
ed99c62874 Tweak sizes and alignment of traces rss/upload buttons 2023-09-14 21:00:57 +03:00
Anton Khorev
bdb4e025f8 Use start margin instead of empty <li> for gap before traces rss button 2023-09-14 18:02:55 +03:00
Anton Khorev
e143726f1a Combine comments and traces pagination partials 2023-09-09 14:33:59 +03:00
Tom Hughes
c909b29c35 Replace page numbers with ID based selection for trace indexes 2023-07-23 19:28:37 +01:00
Andy Allan
10e035df93 Refactor trace guidance to avoid raw html in translations
Also rearrange to avoid multiple sentences in a heading.
2023-02-22 09:16:17 +00:00
Tom Hughes
7df4a7f8a3 Fix background colour for badges on GPS traces
Fixes #3681
2022-09-09 11:01:20 +01:00
Andy Allan
a9a00acf68 Fix italic font styles
This was missed during the bootstrap 5 upgrade
2022-08-03 19:49:46 +01:00
Andy Allan
0bc9ede6ff Use th tags on trace show table
This brings consistency with other similar tables
2022-07-27 13:09:47 +01:00
Andy Allan
f702d5c426 Remove unnecessary br tags
The margin on the table takes care of the spacing.
2022-07-27 11:59:47 +01:00
Tom Hughes
297d05c63b Merge remote-tracking branch 'upstream/pull/3610' 2022-07-21 18:36:29 +01:00
Andy Allan
4e06fe054a Rework trace index to use secondary-actions
The border between items is familiar UI, so we can keep it, but lets
use the secondary-actions approach instead.

This avoids using left-right specific border, margin and padding
classes
2022-07-20 17:45:35 +01:00
Andy Allan
9e6ecefdb2 Bootstrap 5: Remove the padding from trace nav buttons on larger sizes
If additional py is added when the tabs are laid out in full, then the
other tabs start to become detatched from the rest of the page and a
line appears under the active tab.

We don't need the padding in the horizontal layout, so remove it, and
tweak the size of the padding when collapsed.
2022-07-20 14:43:00 +01:00
Anton Khorev
c66f850cd1 Set trace description input max length 2022-07-15 05:19:00 +03:00
Tom Hughes
9adad9f90d Fix new rubocop warnings 2022-06-14 19:04:39 +01:00
Tom Hughes
6403515897 Replace to_s on TimeWithZone objects with to_formatted_s 2022-01-10 18:59:22 +00:00
Andy Allan
75749cc540 Convert remaining heading titles to use h1
This makes them consistent with all the other pages that use h1
in the `content_for :heading` sections
2021-11-11 15:12:23 +00:00
Tom Hughes
29e9857145 Improve behaviour of secondary action lists when wrapping
Based on https://stackoverflow.com/a/31732902 this ensure that when
a secondary action list wraps the additional lines don't start with
an item delimiter by pushing it to the left, outside of a parent nav
element which then hides it.
2021-08-21 15:38:00 +01:00
Andy Allan
a32854fa52 Wrap the rss and upload buttons in a div, with suitable padding for both vertical and horizontal tab layouts
This ensures it looks right when the tabs are collapsed vertically.
2021-06-16 17:08:26 +01:00
Andy Allan
81ad715474 Rework tabs to use flexbox
This improves the behaviour on small widths, where the tabs stack neatly. It also avoids the use of ml-auto which isn't RTL compatible.

The change in indentation is because it was previously coded with multiple li nested inside another li
2021-06-16 16:48:23 +01:00
Andy Allan
62349d1856 Make tab labels into nouns that describe what's on the tab
I think that works better with tabs, whereas actions (verbs) work better with buttons.
2021-06-16 16:27:45 +01:00
Andy Allan
7996b84380 Rearrange tabs for inter-page consistency
The all traces tab comes first, since it's shown on every page as you click around. Otherwise the tabs appear to be constantly rearranging themselves.
2021-06-16 16:26:25 +01:00
Michal Migurski
33f9b7c55f Fixed remaining erblint complaint 2021-06-16 15:55:55 +01:00
Michal Migurski
21eafac304 Fix erblint complaints 2021-06-16 15:55:55 +01:00
Tobias Jordans
f4e998804d Traces#index: Introduce tab navigation, fix tag-filter
- introduce bootstrap tabs to switch the views
- introduce `content_for :heading_class` to remove the padding below the bootstrap tabs
- update the rss-image to use a svg, adopted from https://icons.getbootstrap.com/icons/rss/ (without the outer border)
- move rss- and new-button away from the view-switching actions
- the `@tag` logic was broken. introduce new link to remove the tag-filter; the tabs keep the filter once given; use params[:tag] directly in the view
- use `&.` syntax nil-safety so we can remove `@display_name`
2021-06-16 15:55:55 +01:00
Tom Hughes
2c5e981684 Fix erblint warnings 2021-06-05 07:40:55 +01:00
Andy Allan
a08fe1c291 Use list-inline to achieve spacing between elements on a line
This is a better solution than spans and margins. Additionally, rework
to use mb-* instead of my-* (bootstrap advises against using margin-top)
and get rid of <br>s by using paragraphs instead.
2021-03-17 18:57:36 +00:00
Andy Allan
4dc584421a Refactor traces list display
Ideas taken from #3036
2021-03-17 18:04:00 +00:00
Andy Allan
76146baf60 Remove spacing tweaks and legacy pagination spacing CSS
No need to fight against something that we no longer use.
2021-01-06 15:40:53 +00:00
Tobias Jordans
18ec273038 Traces: Migrate pagination to bootstrap
Same feature, different style.
- Change pagination to use bootstrap default styles
- … but with empty span-tags instead of non-active a-tags
- refactor partial to not use @-variables but get the variables via
the render-call, simplify render-call-syntax
- remove the additional `if @traces.size > 1` inside the pagination
partial since that caused the pagination to disappear on the last page.
The partial will be visible with inactive links.
- Add bootstrap spacer-classes to overwrite commons-css so removing. Eg.
commons also has a pagination class same as bootstrap.
2021-01-03 20:55:50 +01:00
Andy Allan
c8e1b3c662 Prefer string interpolation to concatenation in erb files 2020-11-11 14:44:42 +00:00
Andy Allan
613b748c55 Avoid lego translations for coordinates
Use the i18n system for joining coordinate values together, while
avoiding making any changes or standardisation involving the exact
symbol used in each situation.

Refs #2732
2020-08-19 16:43:16 +02:00
Tom Hughes
c24c2e481c Merge remote-tracking branch 'upstream/pull/2667' 2020-08-05 21:50:08 +01:00
Tom Hughes
cfb2f2988c Merge remote-tracking branch 'upstream/pull/2698' 2020-07-08 19:10:01 +01:00
Andy Allan
1977e66ace Use bootstrap text-muted in place of custom deemphasze class
This avoids changing anything related to forms, since they will be
switched over to bootstrap separately.
2020-07-08 18:30:15 +02:00
Andy Allan
6d9434e14d Remove some extraneous css
The trace part is actually removing html, but I thought it was CSS
when I first noticed the blank space on the page.
2020-07-08 16:57:49 +02:00
Andy Allan
8d2271699b Use bootstrap_form as the formbuilder for GPX upload form
This also uses the recommended bs-custom-file-input javascript plugin
for the file input control.
2020-07-01 17:23:02 +02:00
Andy Allan
627f2493fa Refactor away from global form control styling
This enables forms to be converted one-by-one to bootstrap. Without this
refactoring, these global styles interfere with form control styling from
bootstrap.

The rearrangement of the search and directions styling is to solve CSS selector specitivity issues.
2020-07-01 17:23:02 +02:00
Tom Hughes
6ad0340b05 Localise formatting of point count for traces
Fixes #2592
2020-04-15 22:42:41 +01:00
Andy Allan
055a976051 Remove custom table styling
This removes the custom table styling code, and move to using bootstrap table styling for almost all remaining tables.
2020-04-01 12:29:01 +02:00
Andy Allan
b8c1bbb4f8 Remove unnecessary h() calls on model attributes
These were necessary in the rails 2.x era, but not now.
2020-03-18 14:33:30 +01:00
Andy Allan
5fdada204c Use bootstrap table striping to replace hand-cycled table stripes
This cuts down on the complexity of having to use the `cycle` function
and makes the templates easier to read. CSS-based striping has been
around for many years.

The CSS is in order to keep our custom colour for striped tables.
2020-03-18 12:14:24 +01:00
Andy Allan
f885cfe0f5 Rename form-row to standard-form-row to avoid clashing with a bootstrap class 2020-01-15 17:16:11 +01:00
Tom Hughes
a570f59187 Merge remote-tracking branch 'upstream/pull/2494' 2020-01-05 18:51:42 +00:00
Andy Allan
53f2c36f1d Use ActionView's safe_join to avoid using raw when joining arrays of text 2020-01-02 18:07:23 +01:00
Andy Allan
1ff7e3ac71 Replace custom css class with bootstrap inline utility
This has actually been broken since the controller was renamed,
but nobody noticed.
2019-12-19 19:31:52 +01:00
Andy Allan
1586e2ba80 Use badges for the trace visibility labels
Our green is currently just on the side of triggering black text,
hence the override to make it look consistent with the other badges.
2019-12-19 19:18:00 +01:00
Andy Allan
a3e3be007e Use text-danger style for pending trace warning 2019-12-19 19:15:36 +01:00
Tom Hughes
86b355c4df Use delete method correctly when deleting traces
Fixes #2453
2019-12-04 21:06:19 +00:00
Andy Allan
44c6fdc273 Use the conventional 'destroy' method name for destroying traces 2019-12-04 11:59:18 +01:00