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