مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
initial commit from appmail
هذا الالتزام موجود في:
56
app/views/routes/_form.html.haml
Normal file
56
app/views/routes/_form.html.haml
Normal file
@@ -0,0 +1,56 @@
|
||||
= form_for [organization, @server, @route], :remote => true do |f|
|
||||
= f.error_messages
|
||||
%fieldset.fieldSet
|
||||
.fieldSet__field
|
||||
= f.label :name, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
.routeNameInput
|
||||
= f.text_field :name, :autofocus => true, :class => 'input input--text routeNameInput__name'
|
||||
%span.routeNameInput__at @
|
||||
= f.select :domain_id, domain_options_for_select(@server, @route.domain), {}, :class => 'input input--select routeNameInput__domain'
|
||||
%p.fieldSet__text
|
||||
Enter the address you wish to route. In addition to the name you enter, you'll also received "tagged" mail for this
|
||||
address. See our documentation for details about tagged mail.
|
||||
.fieldSet__field
|
||||
= f.label :_endpoint, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.select :_endpoint, endpoint_options_for_select(@server, @route._endpoint), {}, :class => 'input input--select'
|
||||
%p.fieldSet__text
|
||||
This is the endpoint where mail to this address will be delivered to. If you need to add different endpoints,
|
||||
you can do this using the links above this form.
|
||||
|
||||
.fieldSet__field
|
||||
= f.label :_endpoint, "Additional Endpoints", :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
.fieldSet__selectList
|
||||
- for endpoint in @route.additional_route_endpoints_array
|
||||
= select_tag "route[additional_route_endpoints_array][]", endpoint_options_for_select(@server, endpoint, :other => false), :class => 'input input--select'
|
||||
= select_tag "route[additional_route_endpoints_array][]", endpoint_options_for_select(@server, nil, :other => false), :class => 'input input--select'
|
||||
|
||||
%p.fieldSet__text
|
||||
If you wish to deliver a message to multiple endpoints, you can do so by choosing them from the list above.
|
||||
|
||||
.fieldSet__field
|
||||
= f.label :spam_mode, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.select :spam_mode, Route::SPAM_MODES, {}, :class => 'input input--select'
|
||||
%p.fieldSet__text
|
||||
You can choose what should happen to mail which we identify as spam. If you choose <b>Mark</b> we'll tell you
|
||||
we think its spam when we deliver it to your endpoint. If you choose <b>Quarantine</b>, we won't send the message
|
||||
to you at all and you'll have manually accept it through our web interface or the API if you want it delivered.
|
||||
If you choose <b>Fail</b>, the message will simply be failed without any attempt to deliver your message.
|
||||
- if @route.persisted?
|
||||
.fieldSet__field
|
||||
= f.label :forward_address, "Address", :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.text_field :forward_address, :class => 'input input--text', :readonly => true
|
||||
%p.fieldSet__text
|
||||
If you don't wish to point your MX records to our server, you can redirect your mail to this address and
|
||||
will be routed to your endpoint as if it was sent to the address you entered above.
|
||||
|
||||
.fieldSetSubmit.buttonSet
|
||||
= f.submit @route.new_record? ? "Create route" : "Save route", :class => 'button button--positive js-form-submit'
|
||||
.fieldSetSubmit__delete
|
||||
- if f.object.persisted?
|
||||
= link_to "Delete route", [organization, @server, @route], :remote => true, :class => 'button button--danger', :method => :delete, :data => {:confirm => "Are you sure you wish to delete this route?"}
|
||||
|
||||
6
app/views/routes/_header.html.haml
Normal file
6
app/views/routes/_header.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
.navBar.navBar--secondary
|
||||
%ul
|
||||
%li.navBar__item= link_to "Routes", [organization, @server, :routes], :class => ['navBar__link', active_nav == :routes ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "HTTP Endpoints", [organization, @server, :http_endpoints], :class => ['navBar__link', active_nav == :http_endpoints ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "SMTP Endpoints", [organization, @server, :smtp_endpoints], :class => ['navBar__link', active_nav == :smtp_endpoints ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Address Endpoints", [organization, @server, :address_endpoints], :class => ['navBar__link', active_nav == :address_endpoints ? 'is-active' : '']
|
||||
10
app/views/routes/edit.html.haml
Normal file
10
app/views/routes/edit.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routes"
|
||||
- page_title << "Edit Route"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'header', :active_nav => :routes
|
||||
|
||||
.pageContent.pageContent--compact
|
||||
= render 'form'
|
||||
47
app/views/routes/index.html.haml
Normal file
47
app/views/routes/index.html.haml
Normal file
@@ -0,0 +1,47 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routes"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'header', :active_nav => :routes
|
||||
|
||||
.pageContent.pageContent--compact
|
||||
- if @routes.empty?
|
||||
.noData.noData--monkey.noData--clean
|
||||
%h2.noData__title We heard on the ape vine, you've got no routes yet.
|
||||
%p.noData__text
|
||||
To receive incoming mail, you need to add routes so where we should send
|
||||
messages we receive for your domain. You can send incoming e-mail to
|
||||
HTTP endpoints or other SMTP servers.
|
||||
|
||||
- if @server.smtp_endpoints.empty? && @server.http_endpoints.empty?
|
||||
%p.noData__button.buttonSet.buttonSet--center
|
||||
= link_to "Add a HTTP endpoint", new_organization_server_http_endpoint_path(organization, @server, :return_to => new_organization_server_route_path(organization, @server), :return_notice => "You can now go ahead and add your first route for this HTTP endpoint"), :class => 'button button--positive'
|
||||
= link_to "Add a SMTP endpoint", new_organization_server_smtp_endpoint_path(organization, @server, :return_to => new_organization_server_route_path(organization, @server), :return_notice => "You can now go ahead and add your first route for this SMTP endpoint"), :class => 'button button--positive'
|
||||
%p.noData__postButtonText
|
||||
Once you've added these, you'll be able to come back here to route a
|
||||
specific e-mail address to your newly created endpoint. You can
|
||||
#{link_to "add a route without an endpoint", new_organization_server_route_path(organization, @server), :class => "u-link"} if you really want.
|
||||
- else
|
||||
%p.noData__button
|
||||
= link_to "Add your first route", [:new, organization, @server, :route], :class => 'button button--positive'
|
||||
- else
|
||||
%p.pageContent__intro.u-margin
|
||||
Routes control where incoming mail for your domain is sent. Messages can be sent to
|
||||
HTTP endpoints or other SMTP servers.
|
||||
%p.u-margin.pageContent__helpLink= link_to "Read more about receiving e-mails", [organization, @server, :help_incoming]
|
||||
|
||||
%ul.routeList.u-margin
|
||||
- for route in @routes
|
||||
%li.routeList__item
|
||||
= link_to [:edit, organization, @server, route], :class => 'routeList__link' do
|
||||
%p.routeList__name= route.description
|
||||
.routeList__details
|
||||
%p.routeList__endpoint{:class => "routeList__endpoint--#{route.endpoint_type&.underscore || 'none'}"}
|
||||
- if route.mode == 'Endpoint'
|
||||
= route.endpoint.description
|
||||
- else
|
||||
= t("route_modes.#{route.mode.underscore}")
|
||||
%p.routeList__spamMode= t("route_spam_modes.#{route.spam_mode.underscore}")
|
||||
|
||||
%p.u-center= link_to "Add another route", [:new, organization, @server, :route], :class => 'button button--positive'
|
||||
10
app/views/routes/new.html.haml
Normal file
10
app/views/routes/new.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
- page_title << @server.name
|
||||
- page_title << "Routes"
|
||||
- page_title << "Add Route"
|
||||
|
||||
= render 'servers/sidebar', :active_server => @server
|
||||
= render 'servers/header', :active_nav => :routing
|
||||
= render 'header', :active_nav => :routes
|
||||
|
||||
.pageContent.pageContent--compact
|
||||
= render 'form'
|
||||
المرجع في مشكلة جديدة
حظر مستخدم