Skip to content

Commit

Permalink
Merge pull request #42 from lettergram/add_org_logos
Browse files Browse the repository at this point in the history
add affiliate link
  • Loading branch information
lettergram authored Mar 25, 2023
2 parents 8cf1fb3 + 9d7e396 commit 7c93bf5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/controllers/organizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def show
@letters.group(:target_level).count)

@letters_by_type = @letters.count

@affiliate_link = request.base_url+'?referral_org_id='+@organization.id.to_s

end

Expand Down
10 changes: 7 additions & 3 deletions app/views/organizations/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@
</div>
<div class="col-md-4">
<center>
<% if current_user.org_admin or current_user.admin %>
<%= link_to 'Edit Organization Settings', edit_organization_path(@organization) %>
<% end %>
<strong>
Affiliate Link<br>
<%= link_to @affiliate_link, @affiliate_link %> <br><br>
<% if current_user.org_admin or current_user.admin %>
<%= link_to 'Edit Organization Settings', edit_organization_path(@organization) %>
<% end %>
</strong>
</center>
</div>
</div>
Expand Down

0 comments on commit 7c93bf5

Please sign in to comment.