مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
initial commit from appmail
هذا الالتزام موجود في:
30
app/views/smtp_endpoints/_form.html.haml
Normal file
30
app/views/smtp_endpoints/_form.html.haml
Normal file
@@ -0,0 +1,30 @@
|
||||
= form_for [organization, @server, @smtp_endpoint], :remote => true do |f|
|
||||
= f.error_messages
|
||||
%fieldset.fieldSet
|
||||
.fieldSet__field
|
||||
= f.label :name, :class => 'fieldSet__label'
|
||||
.fieldSet__input= f.text_field :name, :autofocus => true, :class => 'input input--text'
|
||||
.fieldSet__field
|
||||
= f.label :hostname, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.text_field :hostname, :class => 'input input--text'
|
||||
.fieldSet__field
|
||||
= f.label :port, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.text_field :port, :class => 'input input--text', :placeholder => "25 (by default)"
|
||||
.fieldSet__field
|
||||
= f.label :ssl_mode, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.select :ssl_mode, SMTPEndpoint::SSL_MODES, {}, :class => 'input input--select'
|
||||
%p.fieldSet__text
|
||||
Choose what, if any, SSL mode you'd like to use when delivering mail to this mail server.
|
||||
Be aware that any mail sent with no SSL is insecure and not protected in anyway.
|
||||
|
||||
.fieldSetSubmit.buttonSet
|
||||
= f.submit @smtp_endpoint.new_record? ? "Create SMTP endpoint" : "Save SMTP endpoint", :class => 'button button--positive js-form-submit'
|
||||
.fieldSetSubmit__delete
|
||||
- if f.object.persisted?
|
||||
= link_to "Delete SMTP endpoint", [organization, @server, @smtp_endpoint], :remote => true, :class => 'button button--danger', :method => :delete, :data => {:confirm => "Are you sure you wish to delete this SMTP endpoint?\n\r#{pluralize @smtp_endpoint.routes.size, 'route'} that uses this endpoint will also be deleted."}
|
||||
|
||||
= hidden_field_tag 'return_to', params[:return_to]
|
||||
= hidden_field_tag 'return_notice', params[:return_notice]
|
||||
11
app/views/smtp_endpoints/edit.html.haml
Normal file
11
app/views/smtp_endpoints/edit.html.haml
Normal file
@@ -0,0 +1,11 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routing"
|
||||
- page_title << "SMTP Endpoints"
|
||||
- page_title << "Edit"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'routes/header', :active_nav => :smtp_endpoints
|
||||
.pageContent.pageContent--compact
|
||||
= render 'form'
|
||||
|
||||
36
app/views/smtp_endpoints/index.html.haml
Normal file
36
app/views/smtp_endpoints/index.html.haml
Normal file
@@ -0,0 +1,36 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routing"
|
||||
- page_title << "SMTP Endpoints"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'routes/header', :active_nav => :smtp_endpoints
|
||||
.pageContent.pageContent--compact
|
||||
|
||||
- if @smtp_endpoints.empty?
|
||||
.noData.noData--dog.noData--clean
|
||||
%h2.noData__title Im-paws-ible! You've got no SMTP endpoints.
|
||||
%p.noData__text
|
||||
SMTP endpoints are other mail servers that you'd like incoming e-mails
|
||||
to be passed onto. Once you've added some endpoints, you can route messages
|
||||
to them by creating #{link_to 'routes', [organization, @server, :routes], :class => 'u-link'}.
|
||||
%p.noData__button
|
||||
= link_to "Add your first SMTP endpoint", [:new, organization, @server, :smtp_endpoint], :class => 'button button--positive'
|
||||
|
||||
- else
|
||||
|
||||
%ul.endpointList.u-margin
|
||||
- for endpoint in @smtp_endpoints
|
||||
%li.endpointList__item
|
||||
= link_to [:edit, organization, @server, endpoint], :class => 'endpointList__link' do
|
||||
.endpointList__main
|
||||
%p.endpointList__name= endpoint.name
|
||||
%p.endpointList__url= endpoint.hostname
|
||||
%ul.endpointList__details
|
||||
%li.endpointList__detailItem
|
||||
- if endpoint.last_used_at
|
||||
Last used #{distance_of_time_in_words_to_now endpoint.last_used_at} ago
|
||||
- else
|
||||
Not used yet
|
||||
|
||||
%p.u-center= link_to "Add another SMTP endpoint", [:new, organization, @server, :smtp_endpoint], :class => 'button button--positive'
|
||||
11
app/views/smtp_endpoints/new.html.haml
Normal file
11
app/views/smtp_endpoints/new.html.haml
Normal file
@@ -0,0 +1,11 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routing"
|
||||
- page_title << "SMTP Endpoints"
|
||||
- page_title << "New"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'routes/header', :active_nav => :smtp_endpoints
|
||||
.pageContent.pageContent--compact
|
||||
= render 'form'
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم