From cb6c842b42c4eb63da83da0075b0d4fd7f98a330 Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Fri, 22 Feb 2008 01:06:38 +0000 Subject: [PATCH] ActionItem166: form de insercao de comentario melhorado --- app/helpers/application_helper.rb | 22 ---------------------- app/views/content_viewer/_comment_form.rhtml | 19 +++++++++++++++---- app/views/layouts/application.rhtml | 2 +- app/views/shared/user_menu.rhtml | 33 +++++++++++++-------------------- public/designs/icons/default/home-HC.gif | Bin 0 -> 156 bytes public/designs/icons/default/style.css | 1 + public/stylesheets/article.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/menu.css | 34 ++++++++++++++++++++++++++-------- 8 files changed, 106 insertions(+), 55 deletions(-) create mode 100644 public/designs/icons/default/home-HC.gif create mode 100644 public/stylesheets/article.css diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 65a76fd..aefb8ac 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -126,28 +126,6 @@ module ApplicationHelper link_to text, homepage_path(:profile => doc.profile.identifier , :page => path) end - def shortcut_header_links -# search_link = ( lightbox_link_to content_tag('span', _('Search')), { :controller => 'search', :action => 'popup' }, { :id => 'open_search'} ) -# -# if logged_in? -# [ -# ( link_to_homepage 'Photo'+ current_user.login, -# current_user.login, :id=>"link_go_home" ), -# ( link_to_myprofile( content_tag('span', _('control panel')), {}, nil, { :id => 'link_edit_profile'} ) ), -# ( link_to content_tag('span', _('Admin')), { :controller => 'admin_panel' }, :id => 'link_admin_panel' if current_user.person.is_admin?), -# ( lightbox_link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout_popup'}, :id => 'link_logout'), -# search_link, -# ] -# else -# [ -# ( lightbox_link_to content_tag('span', _('Login')), { :controller => 'account', :action => 'login_popup' }, :id => 'link_login' ), -# search_link, -# ] -# end.join(" ") - end - def link_if_permitted(link, permission = nil, target = nil) if permission.nil? || current_user.person.has_permission?(permission, target) link diff --git a/app/views/content_viewer/_comment_form.rhtml b/app/views/content_viewer/_comment_form.rhtml index fe363c2..3dcb518 100644 --- a/app/views/content_viewer/_comment_form.rhtml +++ b/app/views/content_viewer/_comment_form.rhtml @@ -1,6 +1,15 @@ -

<%= _('Post a comment') %>

+<% + comment_form_id = 'comment_form'+ rand(9999).to_s +%> +
-<% form_tag do %> +

<%= _('Post a comment') %>

+ +<% form_tag( {}, { :id => comment_form_id, :style => 'display:none' } ) do %> <% unless logged_in? %> @@ -14,8 +23,10 @@ <% end %> <%= labelled_form_field(_('Title'), text_field(:comment, :title)) %> - <%= labelled_form_field(_('Enter your comment'), text_area(:comment, :body)) %> + <%= labelled_form_field(_('Enter your comment'), text_area(:comment, :body, :rows => 5)) %> <% button_bar do %> - <%= submit_button('post', _('Post comment')) %> + <%= submit_button('add', _('Post comment')) %> <% end %> <% end %> + +
diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 6d4eddc..63ee913 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -13,7 +13,7 @@ stylesheet_import is better then stylesheet_link_tag because the stylesheet must be loaded before the page show. %> - <%= stylesheet_import %w( common help menu button search blocks forms login-box ) %> + <%= stylesheet_import %w( common help menu article button search blocks forms login-box ) %> <%= import_blocks_stylesheets %> <%= # Load the controller's css file if it exists: diff --git a/app/views/shared/user_menu.rhtml b/app/views/shared/user_menu.rhtml index 01d268a..5da01c4 100644 --- a/app/views/shared/user_menu.rhtml +++ b/app/views/shared/user_menu.rhtml @@ -1,38 +1,31 @@
<% if logged_in? %> - <%= - link_to_homepage ''+ current_user.login() +' Icon-Photo'+ - current_user.login, current_user.login, :id=>'link_go_home', :class => 'user_menu_first_link' - %> + +
+ " alt="<%= current_user.login %> Icon-Photo" title="" height="20" border="0"/> + <%= _("%s's Menu") % current_user.login %> +
+
    -
  • Meu Blog
  • +
  • <%= _('My Home Page') %>
  • + +
  • <%= link_to_myprofile( ''+ _('control panel'), {}, nil, :id => 'link_edit_profile' ) %>
  • -
  • <%= link_to( ''+_('Edit Profile'), - :controller => 'profile_editor', :profile => user.identifier, :action => 'edit' ) %>
  • - -
  • <%= link_to( ''+_('Consumed Products'), - :profile => user.identifier, :controller => 'consumed_products' ) %>
  • <%= '
  • '+ link_to( ''+ _('Admin'), { :controller => 'admin_panel' }, :id => 'link_admin_panel' ) + '
  • ' if user.is_admin? %> -
  • <%= link_to( ''+_('Edit Visual Design'), - :controller => 'profile_design', :profile => user.identifier ) %>
  • - -
  • <%= link_to( ''+_('Manage Content'), - :controller => 'cms', :profile => user.identifier) %>
  • -
  • <%= lightbox_link_to( ''+ _('Logout'), { :controller => 'account', :action => 'logout_popup'}, :id => 'link_logout' ) %>
  • @@ -43,7 +36,7 @@ <%= lightbox_link_to ''+ _('Login'), { :controller => 'account', :action => 'login_popup' }, - :id => 'link_login', :class => 'user_menu_first_link' %> + :id => 'link_login' %> <% end %> diff --git a/public/designs/icons/default/home-HC.gif b/public/designs/icons/default/home-HC.gif new file mode 100644 index 0000000..3a6e724 Binary files /dev/null and b/public/designs/icons/default/home-HC.gif differ diff --git a/public/designs/icons/default/style.css b/public/designs/icons/default/style.css index 9980158..010b678 100644 --- a/public/designs/icons/default/style.css +++ b/public/designs/icons/default/style.css @@ -24,6 +24,7 @@ .icon-help32on { background-image: url(help-on-32x32-HC.gif) } .icon-help32off { background-image: url(help-off-32x32-HC.gif) } .icon-menu- { background-image: url(menu-without-ico-HC.gif) } +.icon-menu-home { background-image: url(home-HC.gif) } .icon-menu-blog { background-image: url(blog-HC.gif) } .icon-menu-album { background-image: url(album-HC.gif) } .icon-menu-product { background-image: url(product-HC.gif) } diff --git a/public/stylesheets/article.css b/public/stylesheets/article.css new file mode 100644 index 0000000..800ae36 --- /dev/null +++ b/public/stylesheets/article.css @@ -0,0 +1,50 @@ +/* +** Style for Article Related Elements +*/ + +.post_comment_box { + text-align: center; + padding: 0px 15px 5px 15px; + margin: 10px; +} + +.post_comment_box h4 { + padding: 1px 20px; + margin: 0px; + background: #B8CFE7; +} + +.post_comment_box.closed h4 { + display: inline; + border: 1px solid #729FCF; + cursor: pointer; +} + +.post_comment_box.opened { + border: 1px solid #729FCF; + background: #B8CFE7; +} + +.post_comment_box form { + text-align: left; + margin: -10px 0px 0px 0px; +} + +.post_comment_box .formfield * { + width: 99%; +} + +.post_comment_box .button-bar { + text-align: center; +} + +.post_comment_box input.button { + position: relative; + float: none; + margin: auto; +} + +.post_comment_box .button-bar br { + display: none; +} + diff --git a/public/stylesheets/menu.css b/public/stylesheets/menu.css index 1069b6c..19ec570 100644 --- a/public/stylesheets/menu.css +++ b/public/stylesheets/menu.css @@ -172,7 +172,6 @@ body.category4 #assets_menu_layout_iten { background: url(/images/top-bar/assets #assets_menu_list { padding: 0px 0px 6px 5px; background: url(/images/top-bar/assets-menu-bg-azul.gif) 0% 100%; - Xborder-right: 1px solid #2A5896; } body.category1 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-laranja.gif) } body.category2 #assets_menu_list { background-image: url(/images/top-bar/assets-menu-bg-verde.gif) } @@ -194,8 +193,9 @@ body.category4 #assets_menu_list { background-image: url(/images/top-bar/assets- list-style: none; } +#user_menu_head, #user_box a, -/*#assets_menu a,*/ +#assets_menu a, .top_extra_menu a { font-size: 12px; font-weight: bold; @@ -208,13 +208,21 @@ body.category4 #assets_menu_list { background-image: url(/images/top-bar/assets- overflow: hidden; position: relative; } +body.category1 #user_menu_head, body.category1 #user_box a, +body.category1 #assets_menu a, body.category1 .top_extra_menu a { color: #FDD79E } +body.category2 #user_menu_head, body.category2 #user_box a, +body.category2 #assets_menu a, body.category2 .top_extra_menu a { color: #C4F099 } +body.category3 #user_menu_head, body.category3 #user_box a, +body.category3 #assets_menu a, body.category3 .top_extra_menu a { color: #D6BFD3 } +body.category4 #user_menu_head, body.category4 #user_box a, +body.category4 #assets_menu a, body.category4 .top_extra_menu a { color: #F79494 } #user_box a:hover, .top_extra_menu a:hover { @@ -235,7 +243,7 @@ body.category3 .top_extra_menu a:hover { background: #75507B; color: #FFF } body.category4 #user_box a:hover, body.category4 .top_extra_menu a:hover { background: #CC0000; color: #FFF } -#user_box a img, +#user_box img, #user_box a span, .top_extra_menu a span { position: absolute; @@ -250,18 +258,18 @@ body.category4 .top_extra_menu a:hover { background: #CC0000; color: #FFF } opacity: 0.7; filter: alpha(opacity=70); } -.msie5 #user_box a img, +/*.msie5 #user_box img,*/ .msie5 #user_box a span, .msie5 .top_extra_menu a span { display: none; } -#user_box a img, +#user_box img, #user_box a:hover span, .top_extra_menu a:hover span { opacity: 1; filter: alpha(opacity=100); } -#user_box a img { +#user_box img { border: none; top: -1px; left: -1px; @@ -297,11 +305,21 @@ body.category4 .top_extra_menu a:hover { background: #CC0000; color: #FFF } width: 170px; } -#user_box a.user_menu_first_link { +#user_menu_head { + overflow: visible; + cursor: default; +} +#user_menu_head span { + position: relative; + top: 1px; +} + +#user_menu_head, +#user_box a#link_login { margin-left: 25px; display: inline; } -#user_menu .user_menu_first_link:hover { +#user_menu a#link_login:hover { background: none; } -- libgit2 0.21.2