diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-11 02:43:51 -0400 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-11 02:43:51 -0400 |
commit | 436368d7719a9447c5c09dc6f8b24a623b48f3b6 (patch) | |
tree | c288f4c91d7937303f5f2553c60aa16062bcab73 /app/views/switchboards | |
parent | 0c5c2bc651bc701117d376a68905cb7d2f913449 (diff) | |
parent | beb9e66a5b4e2744435f2c1f301828b68a58c96a (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/views/switchboards')
-rw-r--r-- | app/views/switchboards/_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/switchboards/_form_core.html.haml | 2 | ||||
-rw-r--r-- | app/views/switchboards/_index_core.html.haml | 10 | ||||
-rw-r--r-- | app/views/switchboards/edit.html.haml | 12 | ||||
-rw-r--r-- | app/views/switchboards/index.html.haml | 8 | ||||
-rw-r--r-- | app/views/switchboards/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/switchboards/show.html.haml | 18 |
7 files changed, 60 insertions, 0 deletions
diff --git a/app/views/switchboards/_form.html.haml b/app/views/switchboards/_form.html.haml new file mode 100644 index 0000000..bb09713 --- /dev/null +++ b/app/views/switchboards/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@user, @switchboard]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('switchboards.form.submit') diff --git a/app/views/switchboards/_form_core.html.haml b/app/views/switchboards/_form_core.html.haml new file mode 100644 index 0000000..61b5934 --- /dev/null +++ b/app/views/switchboards/_form_core.html.haml @@ -0,0 +1,2 @@ +.inputs + = f.input :name, :label => t('switchboards.form.name.label'), :hint => conditional_hint('switchboards.form.name.hint'), :autofocus => true diff --git a/app/views/switchboards/_index_core.html.haml b/app/views/switchboards/_index_core.html.haml new file mode 100644 index 0000000..858f624 --- /dev/null +++ b/app/views/switchboards/_index_core.html.haml @@ -0,0 +1,10 @@ +%table.table.table-striped + %tr + %th= t('switchboards.index.name') + %th + + + - for switchboard in switchboards + %tr + %td= switchboard.name + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user, :child => switchboard}
\ No newline at end of file diff --git a/app/views/switchboards/edit.html.haml b/app/views/switchboards/edit.html.haml new file mode 100644 index 0000000..f2e69f4 --- /dev/null +++ b/app/views/switchboards/edit.html.haml @@ -0,0 +1,12 @@ +- content_for :title, t("switchboards.edit.page_title") + +.row + .span12 + = render "form" + +.row + .span12 + - if @switchboard.switchboard_entries && @switchboard.switchboard_entries.count > 0 + = render "switchboard_entries/index_core", :switchboard_entries => @switchboard.switchboard_entries + + = render :partial => 'shared/create_link', :locals => {:parent => @switchboard, :child_class => SwitchboardEntry}
\ No newline at end of file diff --git a/app/views/switchboards/index.html.haml b/app/views/switchboards/index.html.haml new file mode 100644 index 0000000..4f29d7d --- /dev/null +++ b/app/views/switchboards/index.html.haml @@ -0,0 +1,8 @@ +- content_for :title, t("switchboards.index.page_title") + +.row + .span6 + - if @switchboards && @switchboards.count > 0 + = render :partial => "index_core", :locals => {:switchboards => @switchboards, :user => @user} + + = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => Switchboard}
\ No newline at end of file diff --git a/app/views/switchboards/new.html.haml b/app/views/switchboards/new.html.haml new file mode 100644 index 0000000..9f5918f --- /dev/null +++ b/app/views/switchboards/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("switchboards.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/switchboards/show.html.haml b/app/views/switchboards/show.html.haml new file mode 100644 index 0000000..18671c2 --- /dev/null +++ b/app/views/switchboards/show.html.haml @@ -0,0 +1,18 @@ +- content_for :title, @switchboard.name + +.row + .span12 + .well.pull-right + %p + =current_user + + %ul.thumbnails + = render :partial => "switchboard_entries/switchboard_entry", :collection => @switchboard_entries + +- if can? :edit, @switchboard + .row + .span12 + %a.btn.btn-small.btn-warning{:href => switchboard_switchboard_entries_path(@switchboard) } + %i.icon-edit.icon-white + %span.hidden-phone + =t("switchboard_entries.index.page_title") |