On 05/20/2011 04:32 PM, Matt Wagner wrote:
---
src/app/views/layouts/_masthead.haml | 13 +++++++++++++
src/app/views/layouts/application.haml | 13 +------------
2 files changed, 14 insertions(+), 12 deletions(-)
create mode 100644 src/app/views/layouts/_masthead.haml
diff --git a/src/app/views/layouts/_masthead.haml b/src/app/views/layouts/_masthead.haml
new file mode 100644
index 0000000..0638f55
--- /dev/null
+++ b/src/app/views/layouts/_masthead.haml
@@ -0,0 +1,13 @@
+.container
+ = image_tag('upstream-logo.png', :id => 'logo')
+ %nav#system
+ %ul
+ %li.account
+ %span.name.label.strong.small-caps
+ = "#{(a)current_user.first_name} #{(a)current_user.last_name}" if
@current_user.present?
+ %a.button.pill.user-dropdown{:href => '#'}
+ %li.separator
+ %li
+ %div.query-input
+ -# Using verbatim HTML because CSS inline-block requires it.
+ != "<input type='text' placeholder='Search...'
/><input type='submit' value='search' />"
\ No newline at end of file
diff --git a/src/app/views/layouts/application.haml
b/src/app/views/layouts/application.haml
index 37e4a5e..f0f2c5c 100644
--- a/src/app/views/layouts/application.haml
+++ b/src/app/views/layouts/application.haml
@@ -20,18 +20,7 @@
#primary-container
%header#masthead
- .container
- = image_tag('upstream-logo.png', :id => 'logo')
- %nav#system
- %ul
- %li.account
- %span.name.label.strong.small-caps Andy Smith
- %a.button.pill.user-dropdown{:href => '#'}
- %li.separator
- %li
- %div.query-input
- -# Using verbatim HTML because CSS inline-block requires it.
- != "<input type='text' placeholder='Search...'
/><input type='submit' value='search' />"
+ = render :partial => 'layouts/masthead'
%nav#primary
%ul.container
ACK, good thinking.
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.