changed project/xx/view to grid layout
This commit is contained in:
@@ -157,117 +157,85 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if project}
|
{#if project}
|
||||||
<table class="project">
|
<div class="project grid2">
|
||||||
<tbody>
|
<div>{t('project')}</div>
|
||||||
<tr>
|
<div class="name">
|
||||||
<th>
|
<LineEditor bind:value={project.name} editable={true} onSet={val => update({name:val})} />
|
||||||
{t('project')}
|
</div>
|
||||||
<button onclick={kanban}>{t('show_kanban')}</button>
|
<div>
|
||||||
</th>
|
<button onclick={kanban}>{t('show_kanban')}</button>
|
||||||
<td class="name">
|
</div>
|
||||||
<LineEditor bind:value={project.name} editable={true} onSet={val => update({name:val})} />
|
<div>
|
||||||
<button onclick={toggleSettings}><span class="symbol"></span> {t('settings')}</button>
|
<button onclick={toggleSettings}><span class="symbol"></span> {t('settings')}</button>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
<div>{t('state')}</div>
|
||||||
<tr>
|
<div>
|
||||||
<th>{t('state')}</th>
|
<StateSelector selected={project.status} onchange={val => update({status:val})} {project} />
|
||||||
<td>
|
</div>
|
||||||
<StateSelector selected={project.status} onchange={val => update({status:val})} {project} />
|
{#if project.company}
|
||||||
</td>
|
<div>{t('company')}</div>
|
||||||
</tr>
|
<div class="company">{project.company.name}</div>
|
||||||
{#if project.company}
|
{/if}
|
||||||
<tr>
|
<div>{t('context')}</div>
|
||||||
<th>{t('company')}</th>
|
<div>
|
||||||
<td class="company">{project.company.name}</td>
|
<button>{t('files')}</button>
|
||||||
</tr>
|
<button>{t('models')}</button>
|
||||||
|
<button>{t('times')}</button>
|
||||||
|
</div>
|
||||||
|
<div>{t('description')}</div>
|
||||||
|
<div class="description">
|
||||||
|
<MarkdownEditor bind:value={project.description} editable={true} onSet={val => update({description:val})} />
|
||||||
|
</div>
|
||||||
|
{#if showSettings}
|
||||||
|
<div>{t('extended_settings')}</div>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" bind:checked={project.show_closed} onchange={changeClosed} />
|
||||||
|
{t('display_closed_tasks')}
|
||||||
|
</label>
|
||||||
|
<div>{t('members')}</div>
|
||||||
|
<div>
|
||||||
|
<PermissionEditor members={project.members} {updatePermission} {addMember} {dropMember} {getCandidates} />
|
||||||
|
</div>
|
||||||
|
{#if project.allowed_states}
|
||||||
|
{#each Object.keys(project.allowed_states) as key,idx}
|
||||||
|
<div>
|
||||||
|
{#if !idx}
|
||||||
|
{t('allowed_states')}:
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
{key}
|
||||||
<th>{t('context')}</th>
|
</div>
|
||||||
<td>
|
<div>{project.allowed_states[key]}</div>
|
||||||
<button>{t('files')}</button>
|
{/each}
|
||||||
<button>{t('models')}</button>
|
<div>
|
||||||
<button>{t('times')}</button>
|
<input type="number" bind:value={new_state.code} />
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
<div>
|
||||||
<tr>
|
<input type="text" bind:value={new_state.name} />
|
||||||
<th>{t('description')}</th>
|
{#if state_available}
|
||||||
<td class="description">
|
<button onclick={addState} >{t('add_state')}</button>
|
||||||
<MarkdownEditor bind:value={project.description} editable={true} onSet={val => update({description:val})} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{#if showSettings}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('extended_settings')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" bind:checked={project.show_closed} onchange={changeClosed} />
|
|
||||||
{t('display_closed_tasks')}
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('members')}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<PermissionEditor members={project.members} {updatePermission} {addMember} {dropMember} {getCandidates} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{#if project.allowed_states}
|
|
||||||
{#each Object.keys(project.allowed_states) as key,idx}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{#if !idx}
|
|
||||||
{t('allowed_states')}:
|
|
||||||
{/if}
|
|
||||||
{key}
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
{project.allowed_states[key]}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<input type="number" bind:value={new_state.code} />
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
<input type="text" bind:value={new_state.name} />
|
|
||||||
{#if state_available}
|
|
||||||
<button onclick={addState} >{t('add_state')}</button>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
{#if estimated_time.sum}
|
||||||
|
<div>{t('estimated_time')}</div>
|
||||||
|
<div class="estimated_time">{estimated_time.sum} h</div>
|
||||||
|
{/if}
|
||||||
|
<div>{t('tags')}</div>
|
||||||
|
<div>
|
||||||
|
<Tags module="project" {id} user_list={null} />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{t('tasks')}
|
||||||
|
<button onclick={addTask}>{t('add_object',{object:t('task')})}</button>
|
||||||
|
<button onclick={showClosed}>{t('display_closed')}</button>
|
||||||
|
</div>
|
||||||
|
<div class="tasks">
|
||||||
|
{#if tasks}
|
||||||
|
<TaskList {tasks} {estimated_time} states={project?.allowed_states} show_closed={show_closed || project.show_closed} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if estimated_time.sum}
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<th>{t('estimated_time')}</th>
|
|
||||||
<td class="estimated_time">{estimated_time.sum} h</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
<tr>
|
|
||||||
<th>{t('tags')}</th>
|
|
||||||
<td>
|
|
||||||
<Tags module="project" {id} user_list={null} />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
{t('tasks')}
|
|
||||||
<button onclick={addTask}>{t('add_object',{object:t('task')})}</button>
|
|
||||||
<button onclick={showClosed}>{t('display_closed')}</button>
|
|
||||||
</th>
|
|
||||||
<td class="tasks">
|
|
||||||
{#if tasks}
|
|
||||||
<TaskList {tasks} {estimated_time} states={project?.allowed_states} show_closed={show_closed || project.show_closed} />
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{/if}
|
{/if}
|
||||||
<div class="notes">
|
<div class="notes">
|
||||||
<h3>{t('notes')}</h3>
|
<h3>{t('notes')}</h3>
|
||||||
|
|||||||
@@ -393,4 +393,16 @@ table{
|
|||||||
|
|
||||||
a.wikilink{
|
a.wikilink{
|
||||||
display: block;
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid2{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 230px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
.grid2{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user