Organization Members

<% @organization.users.each do |user| %>
"> <%= user.name %>
<% if user.org_admin && user == current_user %> <% elsif user.org_admin && user != current_user %> <%= form_tag "/users/remove_org_admin", onsubmit: "return confirm('Are you sure you want to take away admin status from #{user.name}?');" do %> <%= hidden_field_tag 'user_id', user.id %> <% end %> <% else %> <%= form_tag "/users/add_org_admin", onsubmit: "return confirm('Are you sure you want to give #{user.name} admin status?');" do %> <%= hidden_field_tag 'user_id', user.id %> <% end %> <%= form_tag "/users/remove_from_org", onsubmit: "return confirm('Are you sure you want remove #{user.name} from the organization?');" do %> <%= hidden_field_tag 'user_id', user.id %> <% end %> <% end %>
<% end %>

Grow the team

Invite teammates by sending them the secret and the following instructions:
  1. Sign up at https://dev.to
  2. Navigate to https://dev.to/settings/organization
  3. Paste the secret code below and click Join Organization
Your secret: (You should rotate this regularly)
<%= form_tag "/organizations/generate_new_secret", onsubmit: "return confirm('Are you sure you want to generate a new secret? All outstanding secrets will be invalid.');" do %> <% end %>

Organization Details

<%= form_for(@organization) do |f| %>
<%= f.label :name %> <%= f.text_field :name, maxlength: 50 %>
<%= f.label :profile_image %>
<% if @organization.profile_image_url.present? %> <%= @organization.name %> profile image <%= f.file_field :profile_image %> <% else %> <%= f.file_field :profile_image %> <% end %>
<%= f.label :twitter_username, "Twitter Username" %> <%= f.text_field :twitter_username %>
<%= f.label :github_username, "Github Username"%> <%= f.text_field :github_username %>
<%= f.label :text_color_hex, "Text color (hex)"%> <%= f.text_field :text_color_hex, placeholder: "#ffffff", class: "jscolor {hash:true, required:false}" %>
<%= f.label :bg_color_hex, "Background color (hex)"%> <%= f.text_field :bg_color_hex, placeholder: "#000000", class: "jscolor {hash:true, required:false}" %>
<%= f.label :url, "Site url" %> <%= f.url_field :url, maxlength: 64, placeholder: "http://yoursite.com" %>
<%= f.label :tag_line %> <%= f.text_field :tag_line, maxlength: 60, placeholder: "Limit of 60 characters" %>
<%= f.label :summary %> <%= f.text_area :summary, maxlength: 250, placeholder: "Limit of 250 characters" %>
<%= f.label :location %> <%= f.text_field :location, maxlength: 64, placeholder: "Limit of 64 characters" %>
<%= f.label :email, "Support Email" %> <%= f.text_field :email, maxlength: 64, placeholder: "Limit of 64 characters" %>
<%= f.label :company_size, "Organization Size" %> <%= f.text_field :company_size, maxlength: 10, placeholder: "Enter a number" %>
<%= f.label :story, "Our Story" %> <%= f.text_area :story, maxlength: 640, placeholder: "Limit of 640 characters" %>
<%= f.label :tech_stack, "Our Stack" %> <%= f.text_area :tech_stack, maxlength: 640, placeholder: "Limit of 640 characters" %>

Call-to-action box

Customizable text that appears to the right of every post for your organization

See an example from the DEV Team.

<%= f.label "Body text (Limited markdown — bold/italic/etc)" %> <%= f.text_area :cta_body_markdown, maxlength: 256, placeholder: "**This is an example** _italic_ and **bold** is okay. Links, and headers etc. will not show up. 256 character limit." %>
<%= f.label "Link Text" %> <%= f.text_field :cta_button_text, maxlength: 20, placeholder: "Limit of 20 characters" %>
<%= f.label "Link Text" %> <%= f.text_field :cta_button_url, placeholder: "https://example.com" %>
<%= f.submit "SUBMIT", class: "cta" %>
<% end %>