Skip to content

Commit

Permalink
Add explicit links to Atom feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Nov 20, 2011
1 parent 8b5f0e6 commit b1d8266
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 42 deletions.
61 changes: 23 additions & 38 deletions app/assets/stylesheets/RonRonnement.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ a {
}

button,
#comments p#send-comment,
.toolbox .new_content,
.toolbox .follow_feed,
#comments #follow-feed,
#comments #send-comment,
input[type='submit'] {
color: black;
background-color: $C_CLAIR;
Expand Down Expand Up @@ -197,58 +199,57 @@ form input[type='submit'] {

button, input[type='submit'] {
&.publish_news, &.ok_button {
padding-left: 20px;
background: url("/images/icones/check.png") no-repeat 3px 3px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.refuse_news, &.delete_button, &.cancel {
padding-left: 20px;
background: url("/images/icones/x_red.png") no-repeat 4px 4px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.ppp_news {
padding-left: 20px;
background: url("/images/icones/pin.png") no-repeat 3px 3px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.submit_board {
padding-left: 20px;
background: url("/images/icones/chat.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.submit_news {
padding-left: 20px;
background: url("/images/icones/check_alt.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
margin-bottom: 15px;
}
&.add_para, &.add_link, &.create_news {
padding-left: 20px;
background: url("/images/icones/plus.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.vote_for {
padding-left: 20px;
background: url("/images/icones/arrow_up.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.vote_against {
padding-left: 20px;
background: url("/images/icones/arrow_down.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&.plonk {
padding-left: 20px;
background: url("/images/icones/denied.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
&#admin_49_3, &.archive_button {
padding-left: 20px;
background: url("/images/icones/target.png") no-repeat 2px 2px $C_CLAIR;
&:hover { background-color: $C_FONCE; }
}
}

.toolbox .new_content,
.toolbox .follow_feed,
#comments #follow-feed,
#comments #send-comment {
display: inline-block;
padding: 2px 5px 0 25px;
margin: 5px 10px 3px 0;
}
.toolbox .new_content {
background: url("/images/icones/pen.png") no-repeat 2px 2px $C_CLAIR;
}
.toolbox .follow_feed,
#comments #follow-feed {
background: url("/images/icones/rss.png") no-repeat 2px 2px $C_CLAIR;
}
#comments #send-comment {
background: url("/images/icones/chat.png") no-repeat 2px 2px $C_CLAIR;
}

#top {
background: $C_BANDEAU;
height: $PX_BANDEAU;
Expand Down Expand Up @@ -905,10 +906,8 @@ a.scroll {
margin: 0;
}
.toolbox {
.new_content {
.follow_feed, .new_content {
float: right;
text-align: right;
font-size: medium;
}
a:hover {
text-decoration: none;
Expand Down Expand Up @@ -1013,20 +1012,6 @@ ul.poll {
font-size: small;
margin: 5px 0 5px 0;
}
#comments #send-comment {
display: table;
text-align: center;
margin-left: auto;
margin-right: auto;
padding-left: 5px;
padding-right: 5px;
border: 1px solid $C_INTER;
background-color: $C_CLAIR;
font-size: medium;
a:hover {
text-decoration: none;
}
}
body#comments-show #contents > ul,
body#comments-create #contents > ul,
body#users-comments #contents > ul,
Expand Down
6 changes: 5 additions & 1 deletion app/helpers/node_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def paginated_contents(contents, link=nil)
end

def paginated_section(args, link=nil, &block)
toolbox = link ? content_tag(:div, link, :class => 'new_content') : ''.html_safe
toolbox = ''.html_safe
@feeds.each do |k,v|
toolbox += content_tag(:div, link_to(v, k), :class => "follow_feed")
end
toolbox += content_tag(:div, link, :class => 'new_content') if link
order_bar = render 'shared/order_navbar'
pagination = paginate(args, :inner_window => 10).to_s
before = content_tag(:nav, toolbox + order_bar + pagination, :class => "toolbox")
Expand Down
2 changes: 1 addition & 1 deletion app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
= render 'polls/box'

=h1 "Accueil"
- feed "S'abonner au flux Atom des dépêches", "/news.atom"
- feed "Flux Atom des dépêches", "/news.atom"
- if @ppp
%section#phare
= render @ppp
Expand Down
2 changes: 1 addition & 1 deletion app/views/news/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
= h1 "Les dépêches"
- feed "S'abonner au flux Atom des dépêches"
- feed "Flux Atom des dépêches"
= paginated_nodes @nodes, link_to("Proposer une dépêche", "/news/nouveau")
2 changes: 2 additions & 0 deletions app/views/nodes/_node.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
= render 'comments/thread', :thread => thread
%p#send-comment
= link_to "Envoyer un commentaire", "/nodes/#{node.id}/comments/nouveau"
%p#follow-feed
= link_to "Suivre le flux des commentaires"
%p
%strong Note :
les commentaires appartiennent à ceux qui les ont postés. Nous n'en sommes pas responsables.
2 changes: 1 addition & 1 deletion app/views/sections/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
= render 'box'

=h1 @section.title
- feed "S'abonner au flux Atom des dépêches de #{@section.title}"
- feed "Flux Atom des dépêches de #{@section.title}"
= paginated_contents @news, link_to("Proposer une dépêche", "/news/nouveau")
2 changes: 2 additions & 0 deletions app/views/trackers/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

%nav.toolbox
%h2 <strong>#{Tracker.opened.count}</strong> entrées ouvertes sur un total de #{Tracker.count}
.follow_feed
= link_to "Flux Atom du suivi", "/suivi.atom"
.new_content
= link_to "Proposer une entrée", "/suivi/nouveau"

Expand Down
1 change: 1 addition & 0 deletions app/views/wiki_pages/pages.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=h1 "Les pages du wiki"
- feed "Flux Atom du wiki", "/wiki.atom"
- new_content_link = link_to("Écrire une page de wiki", "/wiki/nouveau") if current_account
= paginated_nodes @nodes, new_content_link
Binary file added public/images/icones/rss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b1d8266

Please sign in to comment.