Skip to content

Instantly share code, notes, and snippets.

@marekkirejczyk
Created December 14, 2011 11:12
Show Gist options
  • Save marekkirejczyk/1476170 to your computer and use it in GitHub Desktop.
Save marekkirejczyk/1476170 to your computer and use it in GitHub Desktop.
= render 'sidebar'
#main
= render 'tabs'
- scope = TranslationScope.new :value => 'pages.answering_accounts'
.data
.generic-data.answering-interfaces
.tab-1
.pie
%table
%tbody
- cycle :even, :odd, :name => :style
%tr{ :class => get_cycle(:style) }
%th= scope.t 'owner'
%td.change-parent
%span.editable-value
= @answering_account.user.try(:username) || scope.t('noparent')
= link_to_overlay content_tag(:span, scope.t('change'), :class => 'edit-inline-button'),
'#', :target => 'overlay_switch_parent_user', :id => 'change-owner', :resource => @answering_account
%tr{ :class => get_cycle(:style) }
%th= scope.t :tool
%td.link= link_to @answering_account.dpa.name, @answering_account.dpa
%tr{ :class => get_cycle(:style) }
%th= scope.t :country
%td= @answering_account.country.name
%tr{ :class => get_cycle(:style) }
%th= scope.t :organization
%td= @answering_account.organization
%tr{ :class => get_cycle(:style) }
%th= scope.t :access_code
%td= @answering_account.access_code
%tr{ :class => get_cycle(:style) }
%th= scope.t :send_method
%td= @answering_account.send_method
%tr{ :class => get_cycle(:style) }
%th= scope.t :answering_interface
%td= @answering_account.answering_interface.try :title
%tr{ :class => get_cycle(:style) }
%th= scope.t :forward_url
%td= @answering_account.forward_url
%tr{ :class => get_cycle(:style) }
%th= scope.t :description
%td= @answering_account.description
%h3
.pie
%table
%tbody
%tr{ :class => get_cycle(:style) }
%th= scope.t :to
%td= @answering_account.to
%tr{ :class => get_cycle(:style) }
%th= scope.t :cc
%td= @answering_account.cc
%tr{ :class => get_cycle(:style) }
%th= scope.t :bcc
%td= @answering_account.bcc
%tr{ :class => get_cycle(:style) }
%th= scope.t :send_to_respondent
%td= scope.t @answering_account.send_to_respondent ? :yes : :no
%tr{ :class => get_cycle(:style) }
%th= t 'global.language'
%td= @answering_account.mail_language.try(:name)
%h3
.pie
%table
%tbody
%tr{ :class => get_cycle(:style) }
%th= scope.t :opening_date
%td= format_date active_user.settings.date_format, @answering_account.opening_date
%tr{ :class => get_cycle(:style) }
%th= scope.t :closing_date
%td= format_date active_user.settings.date_format, @answering_account.closing_date
%tr{ :class => get_cycle(:style) }
%th= 'Status' #scope.t :send_method
%td= @answering_account.human_status
- if current_user.has_access_right_to? :database_individual
.first-action
= link_to scope.t('view_results'),
database_individuals_dpa_path(:answering_account_id => @answering_account.id, :clear_session => true)
.actions
= link_to t('pages.edit'), edit_answering_account_path(@answering_account)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment