{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7608","repository_url":"https://api.github.com/repos/OrchardCMS/Orchard","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7608/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7608/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7608/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/7608","id":214648974,"number":7608,"title":"Element editor in Layouts doesn't care about the position","user":{"login":"alberthajdu","id":12067180,"avatar_url":"https://avatars3.githubusercontent.com/u/12067180?v=3","gravatar_id":"","url":"https://api.github.com/users/alberthajdu","html_url":"https://github.com/alberthajdu","followers_url":"https://api.github.com/users/alberthajdu/followers","following_url":"https://api.github.com/users/alberthajdu/following{/other_user}","gists_url":"https://api.github.com/users/alberthajdu/gists{/gist_id}","starred_url":"https://api.github.com/users/alberthajdu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alberthajdu/subscriptions","organizations_url":"https://api.github.com/users/alberthajdu/orgs","repos_url":"https://api.github.com/users/alberthajdu/repos","events_url":"https://api.github.com/users/alberthajdu/events{/privacy}","received_events_url":"https://api.github.com/users/alberthajdu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-16T09:53:08Z","updated_at":"2017-03-16T19:14:31Z","closed_at":null,"body":"The bug is in _ElementEditor.cshtml_ and here's the fix:\r\n\r\n```\r\n foreach (var tab in Model.Tabs) {\r\n            var orderedEditorsInTab = Model.EditorResult.Editors\r\n                .Where(editor => ShapePosition.Parse((String)editor.Metadata.Position).Name == tab)\r\n                .OrderBy(editor => ShapePosition.Parse((String)editor.Metadata.Position).Position);\r\n            var id = String.Format(\"element-{0}\", tab.ToLowerInvariant());\r\n         <div id=\"@id\" class=\"tab-view\">\r\n             @foreach (var editor in orderedEditorsInTab) {\r\n                @Display(editor)\r\n             }\r\n         </div>\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/287162398","html_url":"https://github.com/OrchardCMS/Orchard/issues/7608#issuecomment-287162398","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7608","id":287162398,"user":{"login":"sebastienros","id":1165805,"avatar_url":"https://avatars3.githubusercontent.com/u/1165805?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastienros","html_url":"https://github.com/sebastienros","followers_url":"https://api.github.com/users/sebastienros/followers","following_url":"https://api.github.com/users/sebastienros/following{/other_user}","gists_url":"https://api.github.com/users/sebastienros/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastienros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastienros/subscriptions","organizations_url":"https://api.github.com/users/sebastienros/orgs","repos_url":"https://api.github.com/users/sebastienros/repos","events_url":"https://api.github.com/users/sebastienros/events{/privacy}","received_events_url":"https://api.github.com/users/sebastienros/received_events","type":"User","site_admin":false},"created_at":"2017-03-16T19:14:31Z","updated_at":"2017-03-16T19:14:31Z","body":"I think there is a helper in CoreShapes to order shapes by their position already. We use it for zones for instance."}}
{"actor":{"display_login":"sebastienros"}}