-
Notifications
You must be signed in to change notification settings - Fork 922
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
Mild rejig of the browse pages #487
Changes from 16 commits
bbf5561
7371ae9
7dc49f3
47f7afe
c2d2b09
bebdbae
93fe5a2
c881ef4
63e1e77
cd8b516
2da012d
ae5bdb2
43b3f8a
6c48876
64b98e0
45a056f
d0b8718
6e18e76
83d787a
f091f75
ca98e8d
8348c4e
3af7c2a
b94c1c7
471bc62
2e043a3
19469ed
a634f12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
/* Styles specific to large screens */ | ||
ul.secondary-actions.pager { | ||
float: right; | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regardless of any other issues with this style rule, you have more close braces then open, which is causing a large number of test failures. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh dear, that's embarrassing, thanks. Will push a brackets fix immediately, before considering the other remaining issues. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,11 @@ | ||
<div class='browse-section common'> | ||
<div> | ||
<% if common_details.visible? %> | ||
<h4><%= t 'browse.common_details.edited_at' %></h4> | ||
<% else %> | ||
<h4><%= t 'browse.common_details.deleted_at' %></h4> | ||
<% end %> | ||
<p><%= l common_details.timestamp %></p> | ||
</div> | ||
|
||
<% if common_details.changeset.user.data_public? %> | ||
<% if common_details.changeset.tags['comment'].present? or (not common_details.tags.empty?) %> | ||
<div class='browse-section common'> | ||
<div> | ||
<% if common_details.visible? %> | ||
<h4><%= t 'browse.common_details.edited_by' %></h4> | ||
<% else %> | ||
<h4><%= t 'browse.common_details.deleted_by' %></h4> | ||
<%= render :partial => "tag_details", :object => common_details %> | ||
<% if common_details.changeset.tags['comment'].present? %> | ||
<h4><%= t 'browse.common_details.changeset_comment' %></h4> | ||
<p><%= linkify(h(common_details.changeset.tags['comment'])) %></p> | ||
<% end %> | ||
<p><%= link_to h(common_details.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_details.changeset.user.display_name %></p> | ||
</div> | ||
<% end %> | ||
|
||
<div> | ||
<h4><%= t 'browse.common_details.version' %></h4> | ||
<p><%= h(common_details.version) %></p> | ||
</div> | ||
|
||
<div> | ||
<h4><%= t 'browse.common_details.in_changeset' %></h4> | ||
<p><%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %></p> | ||
</div> | ||
|
||
<% if common_details.changeset.tags['comment'].present? %> | ||
<div> | ||
<h4><%= t 'browse.common_details.changeset_comment' %></h4> | ||
<p><%= linkify(h(common_details.changeset.tags['comment'])) %></p> | ||
</div> | ||
<% end %> | ||
</div> | ||
<%= render :partial => "tag_details", :object => common_details %> | ||
<% end %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<% | ||
@agohtml = "<abbr title='%s'>%s</abbr>" % [l(common_editsummary.timestamp), t('browse.common_details.ago', :time_in_words_ago => time_ago_in_words(common_editsummary.timestamp))] | ||
|
||
if common_editsummary.changeset.user.data_public? | ||
@userhtml = link_to h(common_editsummary.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_editsummary.changeset.user.display_name | ||
if common_editsummary.visible? %> | ||
<%= raw t 'browse.common_details.edited_ago_by', :time_in_words_ago => @agohtml, :user => @userhtml %> | ||
<% else %> | ||
<%= raw t 'browse.common_details.deleted_ago_by', :time_in_words_ago => @agohtml, :user => @userhtml %> | ||
<% end %> | ||
<% else %> | ||
<% if common_editsummary.visible? %> | ||
<%= raw t 'browse.common_details.edited_ago', :time_in_words_ago => @agohtml %> | ||
<% else %> | ||
<%= raw t 'browse.common_details.deleted_ago', :time_in_words_ago => @agohtml %> | ||
<% end %> | ||
<% end %> | ||
|
||
· | ||
|
||
<%= raw t 'browse.common_details.version_in_changeset', :version => common_editsummary.version, :changeset => link_to(common_editsummary.changeset_id, :action => :changeset, :id => common_editsummary.changeset_id) %> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
<% | ||
@name = printable_name @node | ||
@name = printable_name @node, {:type => t('browse.node.node')} | ||
@title = t('browse.node.node') + ' | ' + @name | ||
%> | ||
<% content_for :head do %> | ||
<%= stylesheet_link_tag 'browse' %> | ||
<% end %> | ||
|
||
<% content_for :heading do %> | ||
<h2><%= t'browse.node.node_title', :node_name => @name %></h2> | ||
<ul class='secondary-actions clearfix'> | ||
<li><%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %></li> | ||
<li><%= link_to(t('browse.node.view_history'), :action => "node_history") %></li> | ||
<% if @node.visible -%> | ||
<li><%= link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id) %></li> | ||
<% end -%> | ||
</ul> | ||
<% end %> | ||
<%= render :partial => "navigation" %> | ||
<h2><%= @name %></h2> | ||
<%= render :partial => "navigation" %> | ||
|
||
<%= render :partial => "common_editsummary", :object => @node %> | ||
|
||
(<%= link_to(t('browse.node.view_history'), :action => "node_history") %>) | ||
|
||
<% end %> | ||
<% if @node.visible -%> | ||
<%= render :partial => "map", :object => @node %> | ||
<% end -%> | ||
|
||
<div class='column-1'> | ||
<%= render :partial => "node_details", :object => @node %> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
<% | ||
@name = printable_name @relation | ||
@name = printable_name @relation, {:type => t('browse.relation.relation')} | ||
@title = t('browse.relation.relation') + ' | ' + @name | ||
%> | ||
<% content_for :head do %> | ||
<%= stylesheet_link_tag 'browse' %> | ||
<% end %> | ||
|
||
<% content_for :heading do %> | ||
<h2><%= t'browse.relation.relation_title', :relation_name => @name %></h2> | ||
<ul class='secondary-actions clearfix'> | ||
<li><%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %></li> | ||
<li><%= link_to(t('browse.relation.view_history'), :action => "relation_history") %></li> | ||
</ul> | ||
<h2><%= @name %></h2> | ||
<%= render :partial => "navigation" %> | ||
|
||
<%= render :partial => "common_editsummary", :object => @relation %> | ||
|
||
(<%= link_to(t('browse.relation.view_history'), :action => "relation_history") %>) | ||
|
||
<% end %> | ||
<%= render :partial => "navigation" %> | ||
<%= render :partial => "map", :object => @relation %> | ||
|
||
<div class='column-1'> | ||
<%= render :partial => "relation_details", :object => @relation %> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'd like to just delete
large.css
, so can this go in the main stylesheet?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the motivation for deleting
large.css
is for speed of loading?On small screens, the float I added looks confusing and messy, which is why I moved it to large-only. If I simply put it in
common.css
and attempt to override it withfloat:none
insmall.css
, it doesn't override, for me. (I tend to avoid using!important
because it feels hacky.) Suggestions welcome about what would be best here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the plan was to get rid of the whole small/large thing in due course and just use media queries in the main file when the site can't be made responsive in other ways, but I might be wrong.
Historically we haven't used
large.css
that much - in most cases we just put the large screen code incommon.css
and override it for small screens insmall.css
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just drop this change? It seems pretty minor, and on
/browse/changesets
, it results in the top pager being hidden behind the map.