diff --git a/app/views/admin/communication/website/blocks/templates/organization_chart/_edit.html.erb b/app/views/admin/communication/website/blocks/templates/organization_chart/_edit.html.erb index 0c6c5f5815f8de8a585ddd28f2ff1838ba503a05..489a9711666812218933bfdc557274f81d9c0884 100644 --- a/app/views/admin/communication/website/blocks/templates/organization_chart/_edit.html.erb +++ b/app/views/admin/communication/website/blocks/templates/organization_chart/_edit.html.erb @@ -2,7 +2,7 @@ <div class="card" ng-repeat="element in data.elements"> <div class="card-body"> <div class="row"> - <div class="col-md-5"> + <div class="col-md-4"> <div class="row"> <div class="col-md-11"> <input class="form-control" type="text" ng-model="element.title"> @@ -12,7 +12,7 @@ </div> </div> </div> - <div class="offset-md-1 col-md-6"> + <div class="offset-md-1 col-md-7"> <div class="row"> <div class="col-md-8"> <p>People</p> @@ -23,13 +23,16 @@ </div> <div ng-repeat="person in element.persons" class="mb-2"> <div class="row"> - <div class="col-md-11"> + <div class="col-md-5"> <select class="form-select select" ng-model="person.slug"> <% @website.university.people.each_with_index do |person, index| %> <option value="<%= person.slug %>"><%= person %></option> <% end %> </select> </div> + <div class="col-md-6"> + <input class="form-control" type="text" ng-model="person.role" placeholder="Type role here"> + </div> <div class="col-md-1 text-end"> <a class="btn btn-sm btn-danger mt-1" ng-click="element.persons.splice(element.persons.indexOf(person))"><i class="fas fa-trash"></i></a> </div> diff --git a/app/views/admin/communication/website/blocks/templates/organization_chart/_show.html.erb b/app/views/admin/communication/website/blocks/templates/organization_chart/_show.html.erb index e9da4c0eefb2d5a690f829353d7866e6a390699d..32092f13fb0730cd15f4899269b1f23138677ee5 100644 --- a/app/views/admin/communication/website/blocks/templates/organization_chart/_show.html.erb +++ b/app/views/admin/communication/website/blocks/templates/organization_chart/_show.html.erb @@ -1,6 +1,6 @@ <% @block.data['elements'].each do |element| %> <h2><%= element['title'] %></h2> <% element['persons'].each do |person| %> - <p><%= person['slug'] %></p> + <p><b><%= person['slug'] %></b>, <%= person['role'] %></p> <% end %> <% end %> diff --git a/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb b/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb index 8442a6bb1c0845b8982428a824ee66851eb7b133..3aa0a781d35a1bedf0bc1bd3ca8e22acc6c3ab60 100644 --- a/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb +++ b/app/views/admin/communication/website/blocks/templates/organization_chart/_static.html.erb @@ -4,7 +4,9 @@ <%= element['title'] %> persons: <% element['persons'].each do |person| %> - - "<%= person['slug'] %>" + - slug: "<%= person['slug'] %>" + role: > + <%= person['role'] %> <% end %> <% end %> <% end %>