مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
initial commit from appmail
هذا الالتزام موجود في:
10
app/views/organizations/_nav.html.haml
Normal file
10
app/views/organizations/_nav.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
- if organization.admin?(current_user)
|
||||
.navBar
|
||||
%ul
|
||||
%li.navBar__item= link_to "Mail Servers", organization_root_path(organization), :class => ['navBar__link', active_nav == :servers ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Domains", organization_domains_path(organization), :class => ['navBar__link', active_nav == :domains ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Settings", organization_settings_path(organization), :class => ['navBar__link', active_nav == :settings ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "IPs", organization_ip_pools_path(organization), :class => ['navBar__link', active_nav == :ips ? 'is-active' : '']
|
||||
%li.navBar__item= link_to "Users", organization_users_path(organization), :class => ['navBar__link', active_nav == :users ? 'is-active' : '']
|
||||
- if organization.owner?(current_user)
|
||||
%li.navBar__item= link_to "Delete Organization", organization_delete_path(organization), :class => ['navBar__link', active_nav == :delete ? 'is-active' : '']
|
||||
24
app/views/organizations/delete.html.haml
Normal file
24
app/views/organizations/delete.html.haml
Normal file
@@ -0,0 +1,24 @@
|
||||
- page_title << organization.name
|
||||
- page_title << "Delete"
|
||||
.pageHeader
|
||||
%h1.pageHeader__title
|
||||
%span.pageHeader__titlePrevious
|
||||
= organization.name
|
||||
→
|
||||
Delete organization
|
||||
= render 'nav', :active_nav => :delete
|
||||
.pageContent.pageContent--compact
|
||||
%h2.pageContent__intro.u-margin
|
||||
If you no longer need this organization you can delete it. When you delete an organization
|
||||
all its mail servers & data will be deleted from our systems.
|
||||
.dangerZone
|
||||
%p.pageContent__text.u-margin
|
||||
To continue to delete this organization, please enter your password in the field below and press
|
||||
continue. <b class='u-red'>There will be no other confirmations.</b>
|
||||
= form_tag [organization, :delete], :method => :delete, :remote => true do
|
||||
= hidden_field_tag 'return_to', params[:return_to]
|
||||
%p.u-margin
|
||||
= password_field_tag "password", '', :class => 'input input--text input--danger'
|
||||
.buttonSet.u-center
|
||||
= submit_tag "Delete this organization, mail servers and all messages", :class => 'button button--danger js-form-submit'
|
||||
|
||||
28
app/views/organizations/edit.html.haml
Normal file
28
app/views/organizations/edit.html.haml
Normal file
@@ -0,0 +1,28 @@
|
||||
- page_title << @organization.name
|
||||
- page_title << "Organization Settings"
|
||||
.pageHeader
|
||||
%h1.pageHeader__title
|
||||
%span.pageHeader__titlePrevious
|
||||
= @organization.name
|
||||
→
|
||||
Settings
|
||||
|
||||
= render 'nav', :active_nav => :settings
|
||||
|
||||
.pageContent.pageContent--compact
|
||||
= form_for @organization_obj, :url => organization_settings_path(@organization_obj), :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 :time_zone, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.time_zone_select :time_zone, [], {}, :class => 'input input--select'
|
||||
%p.fieldSet__text
|
||||
Choose the time zone that your organization exists within. This is used when displaying times in places
|
||||
where there isn't a logged in user to provide their own time zone.
|
||||
|
||||
%p.fieldSetSubmit.buttonSet
|
||||
= f.submit "Save Settings", :class => 'button button--positive js-form-submit'
|
||||
28
app/views/organizations/index.html.haml
Normal file
28
app/views/organizations/index.html.haml
Normal file
@@ -0,0 +1,28 @@
|
||||
- page_title << "Welcome"
|
||||
|
||||
.pageHeader
|
||||
%h1.pageHeader__title Welcome to Postal, #{current_user.first_name}
|
||||
|
||||
.pageContent.pageContent--compact
|
||||
|
||||
- if @organizations.empty?
|
||||
.noData.noData--panda.noData--clean
|
||||
%p.noData__title This is unbearable! You don't have any organizations.
|
||||
%p.noData__text
|
||||
That's not on. You need an organization otherwise you can't do much here. Hit
|
||||
the button below and you'll be up and running with 10,000 free e-mails before
|
||||
you know it.
|
||||
%p.noData__button= link_to "Create your first organization", :new_organization, :class => 'button button--positive'
|
||||
- else
|
||||
%p.pageContent__intro.u-margin
|
||||
Organizations are entities which are able to deploy mail servers.
|
||||
Choose an existing organization from the list opposite or use the button below
|
||||
to create a new one.
|
||||
|
||||
%ul.largeList.u-margin
|
||||
- for organization in @organizations
|
||||
%li.largeList__item
|
||||
= link_to organization_root_path(organization), :class => 'largeList__link' do
|
||||
= organization.name
|
||||
|
||||
%p.u-center= link_to "Start another organization", :new_organization, :class => 'button button--positive'
|
||||
25
app/views/organizations/new.html.haml
Normal file
25
app/views/organizations/new.html.haml
Normal file
@@ -0,0 +1,25 @@
|
||||
- page_title << "Create a new organization"
|
||||
.pageHeader
|
||||
%h1.pageHeader__title Create a new organization
|
||||
.pageContent.pageContent--compact
|
||||
%p.pageContent__intro.u-margin
|
||||
If you're starting a new organization you can do so by completing this form. You'll be able
|
||||
to invite new users & create mail servers as soon as it has been created.
|
||||
= form_for @organization, :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 :permalink, :class => 'fieldSet__label'
|
||||
.fieldSet__input
|
||||
= f.text_field :permalink, :class => 'input input--text', :placeholder => "Automatically generated"
|
||||
%p.fieldSet__text
|
||||
This is a short name which is used in usernames and the API to identify your organization.
|
||||
It should only contain letters, numbers & hyphens.
|
||||
|
||||
.fieldSetSubmit.buttonSet
|
||||
= f.submit "Create organization", :class => 'button button--positive js-form-submit'
|
||||
.fieldSetSubmit__delete
|
||||
= link_to "Back to homepage", root_path, :class => 'button button--neutral'
|
||||
المرجع في مشكلة جديدة
حظر مستخدم