summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/phone_book_entries/_index_core.de.html.haml42
-rw-r--r--app/views/phone_book_entries/_index_core.html.haml86
-rw-r--r--app/views/phone_book_entries/_navigation.html.haml13
-rw-r--r--app/views/phone_books/_index_core.html.haml12
-rw-r--r--app/views/phone_books/show.html.haml4
-rw-r--r--app/views/phones/_index_core.html.haml18
-rw-r--r--app/views/sip_accounts/_index_core.html.haml17
-rw-r--r--app/views/user_groups/_index_core.html.haml16
-rw-r--r--app/views/users/_index_core.html.haml15
9 files changed, 107 insertions, 116 deletions
diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml
deleted file mode 100644
index fe72d26..0000000
--- a/app/views/phone_book_entries/_index_core.de.html.haml
+++ /dev/null
@@ -1,42 +0,0 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - if entry.is_organization == true
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- - else
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
- %td.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
- - elsif entry.phone_numbers.first
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
- - if entry.phone_numbers.count > 1
- %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
- %td.extra
- - if !entry.description.blank?
- %strong Beschreibung:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml
index 6e35221..c7245a2 100644
--- a/app/views/phone_book_entries/_index_core.html.haml
+++ b/app/views/phone_book_entries/_index_core.html.haml
@@ -1,43 +1,43 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - if entry.is_organization == true
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- - else
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
- %td.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
- - elsif entry.phone_numbers.first
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
- - if entry.phone_numbers.count > 1
- %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
- %td.extra
- - if !entry.description.blank?
- %strong Description:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
+= render :partial => "phone_book_entries/navigation"
+
+- cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
+ %table{:class => 'table table-striped'}
+ - for entry in phone_book_entries
+ - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
+ %tr
+ %td
+ = image_tag(entry.image_url(:small).to_s, :itemprop => 'image', :class => 'img-rounded')
+ %td
+ - if entry.is_organization == true
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ - else
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
+ %td
+ - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
+ %span{:style => 'white-space: nowrap'}
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
+ - elsif entry.phone_numbers.first
+ %span{:style => 'white-space: nowrap'}
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
+ - if entry.phone_numbers.count > 1
+ %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
+ %td
+ %span.hidden-phone
+ - if !entry.description.blank?
+ = entry.description
+ - if !entry.homepage_organization.blank?
+ %br
+ =link_to entry.homepage_organization, entry.homepage_organization
+ - if can? :edit, entry
+ %td
+ %a.btn.btn-mini.btn-warning{:href => edit_phone_book_phone_book_entry_path( entry.phone_book, entry ) }
+ %i.icon-edit.icon-white
+ %span.hidden-phone
+ =t('phone_book_entries.index.actions.edit')
+ - if can? :destroy, entry
+ %td
+ %a.btn.btn-mini.btn-danger{"data-confirm" => t('phone_book_entries.index.actions.confirm'), "data-method" => "delete", :href => phone_book_phone_book_entry_path(entry.phone_book, entry), :rel => "nofollow"}
+ %i.icon-trash.icon-white
+ %span.hidden-phone
+ =t('phone_book_entries.index.actions.destroy')
diff --git a/app/views/phone_book_entries/_navigation.html.haml b/app/views/phone_book_entries/_navigation.html.haml
index dd1e8a7..a9a3d58 100644
--- a/app/views/phone_book_entries/_navigation.html.haml
+++ b/app/views/phone_book_entries/_navigation.html.haml
@@ -1,8 +1,7 @@
-%nav
- %ol.abc
- - %w{# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
- %li
- %a{ :href => "?name=#{char}" }= char
+%ul{:class => 'nav nav-pills'}
+ - %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
+ %li
+ %a{ :href => "?name=#{char}" }= char
-.pagination
- = will_paginate @phone_book_entries
+/ .pagination
+/ = will_paginate @phone_book_entries
diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml
index df7a2ef..a95ce7c 100644
--- a/app/views/phone_books/_index_core.html.haml
+++ b/app/views/phone_books/_index_core.html.haml
@@ -2,17 +2,19 @@
%thead
%tr
%th= t('phone_books.index.name')
+ %th
+ %span.visible-desktop
+ = t('phone_books.index.description')
%th= t('phone_books.index.count')
%tbody
- for phone_book in phone_books
%tr
%td
- - if phone_book.description.blank?
- = phone_book.name
- - else
- %a.brand{:rel => 'tooltip', :title => phone_book.description}
- = phone_book.name
+ = phone_book.name
+ %td
+ %span.visible-desktop
+ = phone_book.description
%td
= number_with_delimiter( phone_book.phone_book_entries.count )
diff --git a/app/views/phone_books/show.html.haml b/app/views/phone_books/show.html.haml
index 5140b91..b8030aa 100644
--- a/app/views/phone_books/show.html.haml
+++ b/app/views/phone_books/show.html.haml
@@ -1,5 +1,5 @@
- content_for :title, @phone_book
-- if ! @phone_book.description.blank?
+- if !@phone_book.description.blank?
%p
%strong= t('phone_books.show.description') + ":"
= @phone_book.description
@@ -7,7 +7,7 @@
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_book.phone_bookable, :child => @phone_book }
%h2= t("phone_book_entries.index.page_title")
-- if @phone_book_entries.count > 0
+- if @phone_book_entries.any?
= render "phone_book_entries/index_core", :phone_book_entries => @phone_book_entries
= render :partial => 'shared/create_link', :locals => {:parent => @phone_book, :child_class => PhoneBookEntry} \ No newline at end of file
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
index b8efbe3..fa1c679 100644
--- a/app/views/phones/_index_core.html.haml
+++ b/app/views/phones/_index_core.html.haml
@@ -2,15 +2,25 @@
%thead
%tr
%th= t('phones.index.mac_address')
- %th= t('phones.index.phone_model_id')
- %th= t('phones.index.hot_deskable')
- %th= t('phones.index.ip_address')
+ %th
+ %span.hidden-phone
+ = t('phones.index.phone_model_id')
+ %span.visible-phone
+ = truncate(t('phones.index.phone_model_id'), :length => 9)
+ %th
+ %span.hidden-phone
+ = t('phones.index.hot_deskable')
+ %th
+ %span.hidden-phone
+ = t('phones.index.ip_address')
%tbody
- for phone in phones
%tr
%td= phone.pretty_mac_address
%td= phone.phone_model
- %td= phone.hot_deskable
+ %td
+ %span.hidden-phone
+ = phone.hot_deskable
%td= phone.ip_address
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index ff09c37..e94db83 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -1,10 +1,16 @@
%table{:class => 'table table-striped'}
%thead
%tr
- %th= t('sip_accounts.index.online')
+ %th
+ %span.hidden-phone
+ = t('sip_accounts.index.online')
%th= t('sip_accounts.index.caller_name')
- %th= t('sip_accounts.index.phone_numbers')
- %th= t('phones.name')
+ %th
+ %span.hidden-phone
+ = t('sip_accounts.index.phone_numbers')
+ %th
+ %span.hidden-phone
+ = t('phones.name')
%tbody
- for sip_account in sip_accounts
@@ -22,6 +28,7 @@
= render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
%td
- - sip_account.phones.each do |phone|
- = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
+ %span.hidden-phone
+ - sip_account.phones.each do |phone|
+ = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file
diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml
index 6c830e9..c481a18 100644
--- a/app/views/user_groups/_index_core.html.haml
+++ b/app/views/user_groups/_index_core.html.haml
@@ -4,9 +4,13 @@
%tr
%th= t('user_groups.index.name')
- if user_groups.pluck(:description).uniq != [nil]
- %th= t('user_groups.index.description')
+ %th
+ %span.hidden-phone
+ = t('user_groups.index.description')
- if @user
- %th= t('user_groups.index.tenant_id')
+ %th
+ %span.hidden-phone
+ = t('user_groups.index.tenant_id')
- else
%th= t('user_groups.index.members')
@@ -15,9 +19,13 @@
%tr
%td= user_group.name
- if user_groups.pluck(:description).uniq != [nil]
- %td= user_group.description
+ %td
+ %span.hidden-phone
+ = user_group.description
- if @user
- %td= user_group.tenant
+ %td
+ %span.hidden-phone
+ = user_group.tenant
- else
%td
=render 'users/listing', :users => user_group.users
diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml
index 87d3c4c..77b8c95 100644
--- a/app/views/users/_index_core.html.haml
+++ b/app/views/users/_index_core.html.haml
@@ -4,8 +4,12 @@
%tr
%th
%th= t('users.index.user_name')
- %th= t('users.index.email')
- %th= t('users.index.first_name')
+ %th
+ %span.hidden-phone
+ = t('users.index.email')
+ %th
+ %span.hidden-phone
+ = t('users.index.first_name')
%th= t('users.index.last_name')
%tbody
@@ -23,7 +27,10 @@
%td= user.user_name
%td
- if !user.email.blank?
- = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email)
- %td= user.first_name
+ %span.hidden-phone
+ = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email)
+ %td
+ %span.hidden-phone
+ = user.first_name
%td= user.last_name
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user} \ No newline at end of file