Commit graph

88 commits

Author SHA1 Message Date
Tom Hughes
2fcee9625d Merge remote-tracking branch 'upstream/pull/4349' 2023-11-15 22:30:41 +00:00
Andy Allan
24a562f885 Use html 'time' element for friendly date helpers
This provides more structure than just a simple span.
2023-11-15 17:53:38 +00:00
Tom Hughes
c94de1e1a3 Improve name selection with the query tool
Pass the full expanded list of preferred languages to the client
and use that when looking for the best name for an object.

Fixes #4310
2023-11-14 17:45:50 +00:00
Tom Hughes
6982903ae7 Fix predicate method names in the user model 2023-08-15 18:53:14 +01:00
Anton Khorev
033c032ed6 Add home location condition to user model 2023-08-11 21:44:15 +03:00
Tom Hughes
64457dbbd0 Handle exceptions rendering flash messages 2021-11-23 16:55:06 +00:00
Tom Hughes
b4a1e41968 Switch web site to use OAuth 2 2021-06-27 19:00:36 +01:00
Andy Allan
24f6aeda6a Use hash-based flash objects to render complex flash messages
Since flash objects can only be String, Hash or Array (notably excluding SafeBuffers), then this approach is necessary to render complex html in a safe manner.

Each local can be treated as an (unsafe) string, and therefore escaped normally when rendered into the template. The template (and translation strings) can
contain html since they are no longer stored in the flash as a plain string.

Fixes #3215
2021-06-23 20:10:55 +01:00
Tom Hughes
17b5395e26 Fix new rubocop warnings 2021-06-01 18:27:50 +01:00
Andy Allan
952cf0fdb4 Remove the old richtext_area helper
This has been superseded by the `f.richtext_field` custom form builder.
2021-03-03 15:34:16 +00:00
Tom Hughes
2d50a84004 Fix new rubocop warnings 2021-02-16 21:14:54 +00:00
Tobias Jordans
b470e01f84 Break long URLs where richtext is used.
For example on the blog post show page.

This uses https://getbootstrap.com/docs/4.4/utilities/text/#word-break to break long URLs on the blog post show view.
2020-12-27 22:11:36 +01:00
Tom Hughes
2d3972249c Fix some rubocop todos 2020-08-02 19:38:58 +01:00
Tom Hughes
39b60219fe Fix new rubocop warnings 2020-06-11 19:21:41 +01:00
Tom Hughes
e693063fa5 Make linkify return an HTML safe result for unsafe inputs
Fixes #2567
2020-03-22 12:59:39 +00:00
Andy Allan
f284d57c62 Add a friendly_date_ago helper
Refs #2255
2019-06-19 18:04:08 +02:00
Andy Allan
e1c62f1bf2 Remove if_user and similar methods
Rather than hiding features based on CSS, just avoid including them
in the output. Fixes #1862
2018-05-16 13:05:20 +08:00
Tom Hughes
a83030dab7 Fix new rubocop warnings 2018-01-22 18:55:45 +00:00
Tom Hughes
f773f67958 Update to rails 5.1.4 2017-10-17 18:49:55 +01:00
Tom Hughes
2c9c427587 Convert @user to current_user in helpers 2017-07-27 19:27:17 +01:00
Tom Hughes
2357118c46 Avoid using format as a URL parameter name
This prevents rails confusing it with the builtin format
parameter derived from the URL extension.
2017-06-03 12:08:35 +01:00
Tom Hughes
d7b4f88d5e Remove inline javascript from page header 2017-03-01 21:19:32 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
0c80a486b4 Remove an unused method 2014-03-05 22:54:50 +00:00
John Firebaugh
3d4a137959 Don't rely on body classes so much
Doesn't work well with pushState-based navigation.
2013-10-13 14:46:08 -07:00
John Firebaugh
3d0f9536c4 Add layout-based class to body 2013-10-13 14:46:08 -07:00
John Firebaugh
2ba4bf3744 Add current state to all nav elements 2013-10-13 14:46:06 -07:00
John Firebaugh
8dc16bd8db Make iD default editor
Make iD the default editor for all users that have not specified
a preferred editor, except fall back to P2 on IE.
2013-08-15 16:36:18 -07:00
John Firebaugh
452eabc941 Use full page width when editing with iD 2013-08-10 00:38:46 +01:00
Saman Bemel-Benrud
c3b8897c44 Improve layout and styling of forms 2013-07-08 09:03:17 +01:00
Tom MacWright
597fb5d27f Fix buttons in the richtext help panel 2013-07-08 09:03:16 +01:00
Tom Hughes
979822f697 Add a "Hide" button to notes when viewed by moderators 2013-04-08 22:32:20 +01:00
Tom Hughes
2ef58f47a2 Improve display of anonymous note comments 2013-02-02 13:04:27 +00:00
Tom Hughes
56db9ca2b7 Merge branch 'master' into notes 2013-02-02 11:00:46 +00:00
Tom Hughes
1f7dd79daf Fix lists in rich text to display properly
Add a "richtext" class to anything which contains text rendered
by our rich text library, and move styles which were only being
applied to diary entries to apply to all rich text.
2013-01-24 14:54:26 +00:00
Tom Hughes
fb5e704b26 Mark hide rules as important 2013-01-16 23:28:08 +00:00
Tom Hughes
3d7eb387a7 Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/assets/stylesheets/common.css.scss
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
2013-01-15 21:11:35 +00:00
Saman Bemel-Benrud
a36f3558dd Site cleanup
I set out to do a quick and dirty typography overhaul to make things
more consistent and a bit cleaner, but I kept running into things I
didn't like, so this lead me down something of a rabbit hole of design
tweaks to the OSM site.

Goals here are to have better content hierarchy, better vertical
rhythm, more consistent UI, cleaner markup with less tables, all while
keeping the basics pretty much intact. There are a lot of things I
didn't touch even though they need to be updated (lots of tables where
stuff shouldn't be tables, mostly).

Basic overview of changes:

I added a new persistent header that helps segment pages. It's now
a lot easier to know what you're looking at. The header has a page
title, a description, plus a submenu of actions.

There is now a pattern of 20px/10px margins and padding for more
rhythm and breathing room throughout the site.

I know there are other problems here or things I've missed - would
love another set of eyes to look over this! I am still getting comfortable
working on the site - it's my first time ever digging into a ruby or rails
so I'm not familiar with the templating language yet.
2013-01-14 21:27:08 +00:00
Tom Hughes
ba5107ebb5 Remove the author_name field from notes 2012-12-03 14:50:54 +00:00
Tom Hughes
7599f98957 Merge branch 'master' into notes
Conflicts:
	Gemfile
	Gemfile.lock
	app/assets/stylesheets/common.css.scss
	app/helpers/application_helper.rb
2012-11-20 19:08:30 +00:00
John Firebaugh
c426e8d160 Make it easier to test RTL layout
Instead of fiddling with settings so the site appears in Arabic
or Hebrew, you can add a dir=rtl param to the URL.
2012-10-26 21:36:59 +01:00
Tom Hughes
4d91fe3dd9 Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	app/helpers/application_helper.rb
	app/views/site/index.html.erb
2012-09-20 16:01:24 +01:00
John Firebaugh
e2fed14ab8 Remove unused helper 2012-08-27 20:30:16 +01:00
Tom Hughes
7ad58d1411 Switch to using i18n-js for handling translations in javascript 2012-08-27 18:00:03 +01:00
Tom Hughes
0d3a9ed9cb Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
	config/openlayers.cfg
	db/structure.sql
	vendor/assets/openlayers/OpenLayers.js
2012-08-22 20:52:08 +01:00
Tom Hughes
fe8d5c0573 Move some helper functions to better homes 2012-08-12 16:14:35 +01:00
Tom Hughes
561f2f694a Add preview functionality to rich text controls 2012-03-17 16:36:57 +00:00
Tom Hughes
aa4205482a Treat all newly entered blocks of text as Markdown 2012-03-17 16:36:55 +00:00
Tom Hughes
2c397321c9 Refactor calculation of zoom level based on a scale 2012-03-14 19:12:32 +00:00